home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / iso9660 / security / watcher.tar < prev    next >
Tape Archive  |  1991-07-14  |  212.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Tape Archive (archive/tar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file tar archive default
99% file tar archive (old), file README, mode 100640, uid 011613, gid 000012, size 00000002652, seconds 04447501326, comment: 37777777ingham default
98% file data default
65% TrID Sybase iAnywhere database files default (weak)
34% TrID TAR - Tape ARchive (file) default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype Pre-POSIX tar archive default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 52 45 41 44 4d 45 00 00 | 00 00 00 00 00 00 00 00 |README..|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00000070| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00000080| 30 30 30 32 36 35 32 00 | 30 34 34 34 37 35 30 31 |0002652.|04447501|
|00000090| 33 32 36 00 30 31 30 36 | 35 30 00 20 30 00 00 00 |326.0106|50. 0...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 33 37 37 37 37 37 37 | 37 69 6e 67 68 61 6d 00 |.3777777|7ingham.|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 73 74 61 66 66 00 00 |........|.staff..|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00000160| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 50 6c 65 61 73 65 20 6e | 6f 74 65 20 74 68 65 20 |Please n|ote the |
|00000210| 63 6f 70 79 69 6e 67 20 | 70 6f 6c 69 63 79 20 69 |copying |policy i|
|00000220| 6e 20 74 68 65 20 66 69 | 6c 65 20 43 4f 50 59 49 |n the fi|le COPYI|
|00000230| 4e 47 2e 0a 0a 57 61 74 | 63 68 65 72 20 68 61 73 |NG...Wat|cher has|
|00000240| 20 62 65 65 6e 20 73 75 | 63 65 73 73 66 75 6c 6c | been su|cessfull|
|00000250| 79 20 6d 61 64 65 20 61 | 6e 64 20 72 75 6e 20 6f |y made a|nd run o|
|00000260| 6e 20 34 2e 33 42 53 44 | 20 6f 6e 20 76 61 78 65 |n 4.3BSD| on vaxe|
|00000270| 6e 2c 20 55 6c 74 72 69 | 78 20 33 2e 30 0a 6f 6e |n, Ultri|x 3.0.on|
|00000280| 20 76 61 78 65 6e 20 28 | 77 68 61 74 20 65 6c 73 | vaxen (|what els|
|00000290| 65 3f 29 2c 20 61 6e 64 | 20 61 20 73 75 6e 20 33 |e?), and| a sun 3|
|000002a0| 2f 31 36 30 20 76 65 72 | 73 69 6f 6e 20 34 2e 30 |/160 ver|sion 4.0|
|000002b0| 2e 31 20 6f 66 20 74 68 | 65 20 53 55 4e 4f 53 2e |.1 of th|e SUNOS.|
|000002c0| 0a 54 68 61 6e 6b 73 20 | 74 6f 20 41 6c 61 6e 20 |.Thanks |to Alan |
|000002d0| 53 69 6c 76 65 72 73 74 | 65 69 6e 20 66 6f 72 20 |Silverst|ein for |
|000002e0| 62 72 69 6e 67 69 6e 67 | 20 75 70 20 77 61 74 63 |bringing| up watc|
|000002f0| 68 65 72 20 6f 6e 20 61 | 20 73 79 73 74 65 6d 20 |her on a| system |
|00000300| 56 2e 32 20 6d 61 63 68 | 69 6e 65 20 0a 61 6e 64 |V.2 mach|ine .and|
|00000310| 20 70 6f 69 6e 74 69 6e | 67 20 6f 75 74 20 74 68 | pointin|g out th|
|00000320| 65 20 62 65 72 6b 65 6c | 65 79 69 73 6d 73 20 28 |e berkel|eyisms (|
|00000330| 77 68 69 63 68 20 49 20 | 68 6f 70 65 20 61 72 65 |which I |hope are|
|00000340| 20 61 6c 6c 20 23 69 66 | 64 65 66 27 64 20 6e 6f | all #if|def'd no|
|00000350| 77 29 2e 0a 0a 41 20 73 | 68 6f 72 74 20 64 65 73 |w)...A s|hort des|
|00000360| 63 72 69 70 74 69 6f 6e | 20 6f 66 20 61 6c 6c 20 |cription| of all |
|00000370| 6f 66 20 74 68 65 20 66 | 69 6c 65 73 20 61 6e 64 |of the f|iles and|
|00000380| 20 64 69 72 65 63 74 6f | 72 69 65 73 20 66 6f 72 | directo|ries for|
|00000390| 20 77 61 74 63 68 65 72 | 2e 0a 0a 49 64 65 61 73 | watcher|...Ideas|
|000003a0| 20 2d 20 63 68 61 6e 67 | 65 73 20 74 68 61 74 20 | - chang|es that |
|000003b0| 49 20 6e 65 65 64 20 74 | 6f 20 6f 72 20 77 6f 75 |I need t|o or wou|
|000003c0| 6c 64 20 6c 69 6b 65 20 | 74 6f 20 6d 61 6b 65 20 |ld like |to make |
|000003d0| 66 6f 72 20 77 61 74 63 | 68 65 72 2e 0a 6b 6e 6f |for watc|her..kno|
|000003e0| 77 6e 20 62 75 67 73 20 | 61 72 65 20 6c 69 73 74 |wn bugs |are list|
|000003f0| 65 64 20 68 65 72 65 2e | 20 20 53 6f 6d 65 64 61 |ed here.| Someda|
|00000400| 79 20 49 20 77 69 6c 6c | 20 66 69 78 20 74 68 65 |y I will| fix the|
|00000410| 6d 2e 20 20 49 66 20 79 | 6f 75 20 66 69 78 20 74 |m. If y|ou fix t|
|00000420| 68 65 6d 0a 62 65 66 6f | 72 65 20 49 20 64 6f 2c |hem.befo|re I do,|
|00000430| 20 70 6c 65 61 73 65 20 | 73 65 6e 64 20 74 68 65 | please |send the|
|00000440| 20 66 69 78 65 73 20 74 | 6f 20 6d 65 2e 0a 0a 43 | fixes t|o me...C|
|00000450| 68 61 6e 67 65 73 20 2d | 20 77 68 61 74 20 68 61 |hanges -| what ha|
|00000460| 73 20 63 68 61 6e 67 65 | 64 20 73 69 6e 63 65 20 |s change|d since |
|00000470| 77 61 74 63 68 65 72 20 | 77 61 73 20 6c 61 73 74 |watcher |was last|
|00000480| 20 70 6f 73 74 65 64 20 | 74 6f 20 74 68 65 20 6e | posted |to the n|
|00000490| 65 74 2e 0a 0a 44 6f 63 | 73 20 2d 20 68 65 72 65 |et...Doc|s - here|
|000004a0| 20 69 73 20 61 6c 6c 20 | 6f 66 20 74 68 65 20 64 | is all |of the d|
|000004b0| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 20 66 6f 72 |ocumenta|tion for|
|000004c0| 20 77 61 74 63 68 65 72 | 2e 20 20 41 20 6d 61 6e | watcher|. A man|
|000004d0| 20 70 61 67 65 20 61 6e | 64 20 74 68 65 0a 70 61 | page an|d the.pa|
|000004e0| 70 65 72 20 74 68 61 74 | 20 61 70 70 65 61 72 65 |per that| appeare|
|000004f0| 64 20 69 6e 20 74 68 65 | 20 70 72 6f 63 65 65 64 |d in the| proceed|
|00000500| 69 6e 67 73 20 6f 66 20 | 74 68 65 20 73 75 6d 6d |ings of |the summ|
|00000510| 65 72 20 75 73 65 6e 69 | 78 20 63 6f 6e 66 65 72 |er useni|x confer|
|00000520| 65 6e 63 65 20 0a 69 6e | 20 31 39 38 37 2e 0a 0a |ence .in| 1987...|
|00000530| 4d 61 6b 65 66 69 6c 65 | 20 2d 20 79 6f 75 20 67 |Makefile| - you g|
|00000540| 75 65 73 73 65 64 20 69 | 74 2e 0a 0a 52 45 41 44 |uessed i|t...READ|
|00000550| 4d 45 20 2d 20 74 68 69 | 73 20 66 69 6c 65 0a 0a |ME - thi|s file..|
|00000560| 53 75 70 70 6f 72 74 20 | 2d 20 64 69 72 65 63 74 |Support |- direct|
|00000570| 6f 72 79 20 6f 66 20 75 | 73 65 66 75 6c 20 66 69 |ory of u|seful fi|
|00000580| 6c 65 73 20 74 6f 20 75 | 73 65 20 77 69 74 68 20 |les to u|se with |
|00000590| 77 61 74 63 68 65 72 2e | 20 20 54 68 65 72 65 20 |watcher.| There |
|000005a0| 77 65 72 65 0a 74 61 6b | 65 6e 20 66 72 6f 6d 20 |were.tak|en from |
|000005b0| 61 63 74 75 61 6c 20 75 | 73 65 20 61 74 20 55 4e |actual u|se at UN|
|000005c0| 4d 20 28 61 6c 74 68 6f | 75 67 68 20 74 68 65 79 |M (altho|ugh they|
|000005d0| 20 77 65 72 65 20 74 61 | 6b 65 6e 20 61 20 77 68 | were ta|ken a wh|
|000005e0| 69 6c 65 20 62 61 63 6b | 20 61 6e 64 0a 6d 61 79 |ile back| and.may|
|000005f0| 20 6e 6f 74 20 62 65 20 | 77 68 61 74 20 69 73 20 | not be |what is |
|00000600| 69 6e 20 75 73 65 20 6e | 6f 77 29 2e 20 20 54 68 |in use n|ow). Th|
|00000610| 65 79 20 6d 61 79 20 68 | 65 6c 70 20 69 6e 20 73 |ey may h|elp in s|
|00000620| 65 65 69 6e 67 20 68 6f | 77 20 61 74 20 6c 65 61 |eeing ho|w at lea|
|00000630| 73 74 0a 6f 6e 65 20 73 | 69 74 65 20 69 73 20 72 |st.one s|ite is r|
|00000640| 75 6e 6e 69 6e 67 20 77 | 61 74 63 68 65 72 2e 0a |unning w|atcher..|
|00000650| 0a 54 68 65 20 72 65 73 | 74 20 6f 66 20 74 68 65 |.The res|t of the|
|00000660| 20 66 69 6c 65 73 20 73 | 68 6f 75 6c 64 20 62 65 | files s|hould be|
|00000670| 20 74 68 65 20 73 6f 75 | 72 63 65 2e 0a 0a 48 61 | the sou|rce...Ha|
|00000680| 70 70 79 20 57 61 74 63 | 68 69 6e 67 2e 0a 0a 42 |ppy Watc|hing...B|
|00000690| 75 67 20 66 69 78 65 73 | 20 61 6e 64 20 72 65 70 |ug fixes| and rep|
|000006a0| 6f 72 74 73 20 73 68 6f | 75 6c 64 20 62 65 20 73 |orts sho|uld be s|
|000006b0| 65 6e 74 20 74 6f 3a 0a | 0a 4b 65 6e 6e 65 74 68 |ent to:.|.Kenneth|
|000006c0| 20 49 6e 67 68 61 6d 0a | 55 6e 69 76 65 72 73 69 | Ingham.|Universi|
|000006d0| 74 79 20 6f 66 20 4e 65 | 77 20 4d 65 78 69 63 6f |ty of Ne|w Mexico|
|000006e0| 0a 43 6f 6d 70 75 74 65 | 72 20 61 6e 64 20 49 6e |.Compute|r and In|
|000006f0| 66 6f 72 6d 61 74 69 6f | 6e 20 52 65 73 6f 75 72 |formatio|n Resour|
|00000700| 63 65 73 20 61 6e 64 20 | 54 65 63 68 6e 6f 6c 6f |ces and |Technolo|
|00000710| 67 79 20 28 43 49 52 54 | 29 0a 41 6c 62 75 71 75 |gy (CIRT|).Albuqu|
|00000720| 65 72 71 75 65 2c 20 4e | 4d 20 38 37 31 33 31 0a |erque, N|M 87131.|
|00000730| 35 30 35 2d 32 37 37 2d | 38 30 34 35 0a 0a 49 6e |505-277-|8045..In|
|00000740| 74 65 72 6e 65 74 3a 20 | 69 6e 67 68 61 6d 40 61 |ternet: |ingham@a|
|00000750| 72 69 65 6c 2e 75 6e 6d | 2e 65 64 75 0a 42 49 54 |riel.unm|.edu.BIT|
|00000760| 4e 45 54 3a 20 20 20 69 | 6e 67 68 61 6d 40 75 6e |NET: i|ngham@un|
|00000770| 6d 62 09 09 0a 55 73 65 | 6e 65 74 3a 20 20 20 7b |mb...Use|net: {|
|00000780| 63 6f 6e 76 65 78 2c 75 | 63 62 76 61 78 2c 67 61 |convex,u|cbvax,ga|
|00000790| 74 65 63 68 7d 21 75 6e | 6d 76 61 78 21 61 72 69 |tech}!un|mvax!ari|
|000007a0| 65 6c 21 69 6e 67 68 61 | 6d 0a 00 00 00 00 00 00 |el!ingha|m.......|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 43 79 79 6c 65 78 2e 63 | 00 00 00 00 00 00 00 00 |Cyylex.c|........|
|00000810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 31 30 30 34 | 34 30 00 00 30 31 31 36 |....1004|40..0116|
|00000870| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00000880| 30 30 30 33 35 37 31 00 | 30 34 34 35 37 34 35 33 |0003571.|04457453|
|00000890| 35 34 35 00 30 30 37 34 | 35 37 00 20 30 00 00 00 |545.0074|57. 0...|
|000008a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000900| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00000910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00000960| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 2f 2a 0a 20 20 20 79 79 | 6c 65 78 20 66 6f 72 20 |/*. yy|lex for |
|00000a10| 77 61 74 63 68 65 72 3a | 20 74 68 69 73 20 69 73 |watcher:| this is|
|00000a20| 20 61 20 73 69 6d 70 6c | 65 20 72 6f 75 74 69 6e | a simpl|e routin|
|00000a30| 65 20 6c 6f 6f 6b 69 6e | 67 20 66 6f 72 20 6e 75 |e lookin|g for nu|
|00000a40| 6d 62 65 72 73 2c 0a 20 | 20 20 73 70 65 63 69 61 |mbers,. | specia|
|00000a50| 6c 20 63 68 61 72 61 63 | 74 65 72 73 20 61 6e 64 |l charac|ters and|
|00000a60| 20 73 74 72 69 6e 67 73 | 2e 20 20 54 68 65 20 73 | strings|. The s|
|00000a70| 70 65 63 69 61 6c 20 63 | 68 61 72 73 20 61 72 65 |pecial c|hars are|
|00000a80| 20 73 74 6f 72 65 64 20 | 69 6e 0a 20 20 20 27 77 | stored |in. 'w|
|00000a90| 6f 72 64 73 27 20 61 6e | 64 20 72 65 70 72 65 73 |ords' an|d repres|
|00000aa0| 65 6e 74 20 74 6f 6b 65 | 6e 73 20 62 79 20 74 68 |ent toke|ns by th|
|00000ab0| 65 6d 73 65 6c 76 65 73 | 2e 20 20 20 49 6e 20 79 |emselves|. In y|
|00000ac0| 2e 74 61 62 2e 68 20 61 | 72 65 20 74 68 65 0a 20 |.tab.h a|re the. |
|00000ad0| 20 20 76 61 6c 75 65 73 | 20 74 6f 20 72 65 74 75 | values| to retu|
|00000ae0| 72 6e 20 66 6f 72 20 74 | 68 65 20 76 61 72 69 6f |rn for t|he vario|
|00000af0| 75 73 20 74 6f 6b 65 6e | 73 20 77 68 69 63 68 20 |us token|s which |
|00000b00| 61 72 65 20 6e 6f 74 20 | 6c 69 73 74 65 64 20 69 |are not |listed i|
|00000b10| 6e 0a 20 20 20 27 77 6f | 72 64 73 27 2e 0a 0a 20 |n. 'wo|rds'... |
|00000b20| 20 20 4b 65 6e 6e 65 74 | 68 20 49 6e 67 68 61 6d | Kennet|h Ingham|
|00000b30| 0a 0a 20 20 20 43 6f 70 | 79 72 69 67 68 74 20 28 |.. Cop|yright (|
|00000b40| 43 29 20 31 39 38 37 20 | 54 68 65 20 55 6e 69 76 |C) 1987 |The Univ|
|00000b50| 65 72 73 69 74 79 20 6f | 66 20 4e 65 77 20 4d 65 |ersity o|f New Me|
|00000b60| 78 69 63 6f 0a 2a 2f 0a | 0a 23 69 6e 63 6c 75 64 |xico.*/.|.#includ|
|00000b70| 65 20 22 64 65 66 73 2e | 68 22 0a 23 69 6e 63 6c |e "defs.|h".#incl|
|00000b80| 75 64 65 20 22 79 2e 74 | 61 62 2e 68 22 0a 0a 63 |ude "y.t|ab.h"..c|
|00000b90| 68 61 72 20 77 6f 72 64 | 73 5b 5d 20 3d 20 22 5c |har word|s[] = "\|
|00000ba0| 22 2e 2c 2a 7c 3b 3a 25 | 40 24 2d 7b 7d 22 3b 0a |".,*|;:%|@$-{}";.|
|00000bb0| 0a 79 79 6c 65 78 28 29 | 0a 7b 0a 09 69 6e 74 20 |.yylex()|.{..int |
|00000bc0| 63 2c 20 69 3b 0a 09 73 | 74 61 74 69 63 20 63 68 |c, i;..s|tatic ch|
|00000bd0| 61 72 20 73 74 72 5b 4d | 41 58 5f 53 54 52 5d 3b |ar str[M|AX_STR];|
|00000be0| 0a 09 69 6e 74 20 72 65 | 61 6c 3b 0a 0a 09 77 68 |..int re|al;...wh|
|00000bf0| 69 6c 65 20 28 69 73 73 | 70 61 63 65 28 63 20 3d |ile (iss|pace(c =|
|00000c00| 20 67 65 74 63 68 61 72 | 28 29 29 29 0a 09 09 3b | getchar|()))...;|
|00000c10| 0a 0a 09 69 66 20 28 63 | 20 3d 3d 20 45 4f 46 29 |...if (c| == EOF)|
|00000c20| 0a 09 09 72 65 74 75 72 | 6e 20 45 4f 46 3b 0a 0a |...retur|n EOF;..|
|00000c30| 09 69 66 20 28 63 20 3d | 3d 20 27 28 27 29 20 7b |.if (c =|= '(') {|
|00000c40| 20 2f 2a 20 61 68 61 2c | 20 70 69 70 65 6c 69 6e | /* aha,| pipelin|
|00000c50| 65 20 2a 2f 0a 09 09 63 | 20 3d 20 67 65 74 63 68 |e */...c| = getch|
|00000c60| 61 72 28 29 3b 0a 09 09 | 66 6f 72 20 28 69 3d 30 |ar();...|for (i=0|
|00000c70| 3b 20 63 20 21 3d 20 45 | 4f 46 20 26 26 20 63 20 |; c != E|OF && c |
|00000c80| 21 3d 20 27 29 27 3b 20 | 69 2b 2b 29 20 7b 0a 09 |!= ')'; |i++) {..|
|00000c90| 09 09 73 74 72 5b 69 5d | 20 3d 20 63 3b 0a 09 09 |..str[i]| = c;...|
|00000ca0| 09 63 20 3d 20 67 65 74 | 63 68 61 72 28 29 3b 0a |.c = get|char();.|
|00000cb0| 09 09 7d 0a 09 09 73 74 | 72 5b 69 5d 20 3d 20 27 |..}...st|r[i] = '|
|00000cc0| 5c 30 27 3b 0a 09 09 69 | 66 20 28 63 20 3d 3d 20 |\0';...i|f (c == |
|00000cd0| 45 4f 46 29 20 7b 0a 09 | 09 09 66 70 72 69 6e 74 |EOF) {..|..fprint|
|00000ce0| 66 28 73 74 64 65 72 72 | 2c 20 22 4d 69 73 73 69 |f(stderr|, "Missi|
|00000cf0| 6e 67 20 27 29 27 20 74 | 6f 20 65 6e 64 20 70 69 |ng ')' t|o end pi|
|00000d00| 70 65 6c 69 6e 65 2e 5c | 6e 22 29 3b 0a 09 09 09 |peline.\|n");....|
|00000d10| 72 65 74 75 72 6e 20 45 | 4f 46 3b 0a 09 09 7d 0a |return E|OF;...}.|
|00000d20| 09 09 79 79 6c 76 61 6c | 2e 73 74 72 20 3d 20 73 |..yylval|.str = s|
|00000d30| 74 72 73 61 76 65 28 73 | 74 72 29 3b 0a 09 09 72 |trsave(s|tr);...r|
|00000d40| 65 74 75 72 6e 20 50 49 | 50 45 4c 49 4e 45 3b 0a |eturn PI|PELINE;.|
|00000d50| 09 7d 0a 0a 09 69 66 20 | 28 63 20 3d 3d 20 27 23 |.}...if |(c == '#|
|00000d60| 27 29 20 7b 20 2f 2a 20 | 63 6f 6d 6d 65 6e 74 20 |') { /* |comment |
|00000d70| 74 6f 20 65 6e 64 20 6f | 66 20 6c 69 6e 65 20 2a |to end o|f line *|
|00000d80| 2f 0a 09 09 77 68 69 6c | 65 20 28 63 20 21 3d 20 |/...whil|e (c != |
|00000d90| 27 5c 6e 27 20 26 26 20 | 63 20 21 3d 20 45 4f 46 |'\n' && |c != EOF|
|00000da0| 29 0a 09 09 09 63 20 3d | 20 67 65 74 63 68 61 72 |)....c =| getchar|
|00000db0| 28 29 3b 0a 09 09 69 66 | 20 28 63 20 3d 3d 20 45 |();...if| (c == E|
|00000dc0| 4f 46 29 0a 09 09 09 72 | 65 74 75 72 6e 20 45 4f |OF)....r|eturn EO|
|00000dd0| 46 3b 0a 09 09 72 65 74 | 75 72 6e 20 79 79 6c 65 |F;...ret|urn yyle|
|00000de0| 78 28 29 3b 0a 09 7d 0a | 0a 09 69 66 20 28 69 6e |x();..}.|..if (in|
|00000df0| 64 65 78 28 77 6f 72 64 | 73 2c 20 63 29 20 21 3d |dex(word|s, c) !=|
|00000e00| 20 30 29 0a 09 09 72 65 | 74 75 72 6e 20 63 3b 0a | 0)...re|turn c;.|
|00000e10| 0a 09 69 66 20 28 63 20 | 3d 3d 20 27 2b 27 20 7c |..if (c |== '+' ||
|00000e20| 7c 20 63 20 3d 3d 20 27 | 2d 27 20 7c 7c 20 69 73 || c == '|-' || is|
|00000e30| 64 69 67 69 74 28 63 29 | 29 20 7b 20 2f 2a 20 61 |digit(c)|) { /* a|
|00000e40| 20 6e 75 6d 62 65 72 20 | 2a 2f 0a 09 09 72 65 61 | number |*/...rea|
|00000e50| 6c 20 3d 20 46 61 6c 73 | 65 3b 0a 09 09 69 20 3d |l = Fals|e;...i =|
|00000e60| 20 30 3b 0a 09 09 73 74 | 72 5b 69 2b 2b 5d 20 3d | 0;...st|r[i++] =|
|00000e70| 20 63 3b 0a 09 09 64 6f | 20 7b 0a 09 09 09 73 74 | c;...do| {....st|
|00000e80| 72 5b 69 2b 2b 5d 20 3d | 20 67 65 74 63 68 61 72 |r[i++] =| getchar|
|00000e90| 28 29 3b 0a 09 09 09 69 | 66 20 28 73 74 72 5b 69 |();....i|f (str[i|
|00000ea0| 2d 31 5d 20 3d 3d 20 27 | 2e 27 29 20 0a 09 09 09 |-1] == '|.') ....|
|00000eb0| 09 72 65 61 6c 20 3d 20 | 54 72 75 65 3b 0a 09 09 |.real = |True;...|
|00000ec0| 7d 20 77 68 69 6c 65 20 | 28 69 73 64 69 67 69 74 |} while |(isdigit|
|00000ed0| 28 73 74 72 5b 69 2d 31 | 5d 29 20 7c 7c 20 73 74 |(str[i-1|]) || st|
|00000ee0| 72 5b 69 2d 31 5d 20 3d | 3d 20 27 2e 27 29 3b 0a |r[i-1] =|= '.');.|
|00000ef0| 09 09 28 76 6f 69 64 29 | 20 75 6e 67 65 74 63 68 |..(void)| ungetch|
|00000f00| 61 72 28 73 74 72 5b 69 | 2d 31 5d 29 3b 0a 09 09 |ar(str[i|-1]);...|
|00000f10| 73 74 72 5b 69 2d 31 5d | 20 3d 20 27 5c 30 27 3b |str[i-1]| = '\0';|
|00000f20| 0a 09 09 69 66 20 28 72 | 65 61 6c 29 20 7b 0a 09 |...if (r|eal) {..|
|00000f30| 09 09 79 79 6c 76 61 6c | 2e 72 65 61 6c 20 3d 20 |..yylval|.real = |
|00000f40| 28 66 6c 6f 61 74 29 20 | 61 74 6f 66 28 73 74 72 |(float) |atof(str|
|00000f50| 29 3b 0a 09 09 09 72 65 | 74 75 72 6e 20 46 4c 4f |);....re|turn FLO|
|00000f60| 41 54 3b 0a 09 09 7d 0a | 09 09 65 6c 73 65 20 7b |AT;...}.|..else {|
|00000f70| 0a 09 09 09 79 79 6c 76 | 61 6c 2e 69 6e 74 65 67 |....yylv|al.integ|
|00000f80| 65 72 20 3d 20 61 74 6f | 69 28 73 74 72 29 3b 0a |er = ato|i(str);.|
|00000f90| 09 09 09 72 65 74 75 72 | 6e 20 49 4e 54 45 47 45 |...retur|n INTEGE|
|00000fa0| 52 3b 0a 09 09 7d 0a 09 | 7d 0a 0a 09 69 66 20 28 |R;...}..|}...if (|
|00000fb0| 63 20 3d 3d 20 27 5c 27 | 27 29 20 7b 20 2f 2a 20 |c == '\'|') { /* |
|00000fc0| 6c 69 74 65 72 61 6c 20 | 73 74 72 69 6e 67 20 2a |literal |string *|
|00000fd0| 2f 0a 09 09 63 20 3d 20 | 67 65 74 63 68 61 72 28 |/...c = |getchar(|
|00000fe0| 29 3b 0a 09 09 66 6f 72 | 20 28 69 3d 30 3b 20 63 |);...for| (i=0; c|
|00000ff0| 20 21 3d 20 45 4f 46 20 | 26 26 20 63 20 21 3d 20 | != EOF |&& c != |
|00001000| 27 5c 27 27 3b 20 69 2b | 2b 29 20 7b 0a 09 09 09 |'\''; i+|+) {....|
|00001010| 73 74 72 5b 69 5d 20 3d | 20 63 3b 0a 09 09 09 63 |str[i] =| c;....c|
|00001020| 20 3d 20 67 65 74 63 68 | 61 72 28 29 3b 0a 09 09 | = getch|ar();...|
|00001030| 7d 0a 09 09 73 74 72 5b | 69 5d 20 3d 20 27 5c 30 |}...str[|i] = '\0|
|00001040| 27 3b 0a 09 09 79 79 6c | 76 61 6c 2e 73 74 72 20 |';...yyl|val.str |
|00001050| 3d 20 73 74 72 73 61 76 | 65 28 73 74 72 29 3b 0a |= strsav|e(str);.|
|00001060| 09 09 72 65 74 75 72 6e | 20 53 54 52 49 4e 47 3b |..return| STRING;|
|00001070| 0a 09 7d 0a 0a 09 2f 2a | 20 6e 6f 74 68 69 6e 67 |..}.../*| nothing|
|00001080| 20 65 6c 73 65 20 6d 61 | 74 63 68 65 64 2e 20 20 | else ma|tched. |
|00001090| 4d 75 73 74 20 62 65 20 | 70 6c 61 69 6e 20 73 74 |Must be |plain st|
|000010a0| 72 69 6e 67 20 28 77 68 | 69 74 65 73 70 61 63 65 |ring (wh|itespace|
|000010b0| 20 73 65 70 29 20 2a 2f | 0a 09 66 6f 72 20 28 69 | sep) */|..for (i|
|000010c0| 3d 31 2c 20 73 74 72 5b | 30 5d 3d 63 3b 20 63 20 |=1, str[|0]=c; c |
|000010d0| 21 3d 20 45 4f 46 20 26 | 26 20 21 69 73 73 70 61 |!= EOF &|& !isspa|
|000010e0| 63 65 28 63 29 20 26 26 | 20 21 69 6e 64 65 78 28 |ce(c) &&| !index(|
|000010f0| 77 6f 72 64 73 2c 63 29 | 3b 20 69 2b 2b 29 20 7b |words,c)|; i++) {|
|00001100| 0a 09 09 63 20 3d 20 67 | 65 74 63 68 61 72 28 29 |...c = g|etchar()|
|00001110| 3b 0a 09 09 73 74 72 5b | 69 5d 20 3d 20 63 3b 0a |;...str[|i] = c;.|
|00001120| 09 7d 0a 09 28 76 6f 69 | 64 29 20 75 6e 67 65 74 |.}..(voi|d) unget|
|00001130| 63 68 61 72 28 63 29 3b | 0a 09 73 74 72 5b 69 2d |char(c);|..str[i-|
|00001140| 31 5d 20 3d 20 27 5c 30 | 27 3b 0a 09 79 79 6c 76 |1] = '\0|';..yylv|
|00001150| 61 6c 2e 73 74 72 20 3d | 20 73 74 72 73 61 76 65 |al.str =| strsave|
|00001160| 28 73 74 72 29 3b 0a 09 | 72 65 74 75 72 6e 20 53 |(str);..|return S|
|00001170| 54 52 49 4e 47 3b 0a 7d | 0a 00 00 00 00 00 00 00 |TRING;.}|........|
|00001180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001200| 61 62 73 5f 63 68 65 63 | 6b 2e 63 00 00 00 00 00 |abs_chec|k.c.....|
|00001210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001260| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00001270| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00001280| 30 30 30 31 35 34 36 00 | 30 34 34 36 35 37 32 36 |0001546.|04465726|
|00001290| 35 31 37 00 30 31 30 31 | 30 37 00 20 30 00 00 00 |517.0101|07. 0...|
|000012a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001300| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00001310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001350| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00001360| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00001370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001400| 2f 2a 0a 20 20 20 61 62 | 73 5f 63 68 65 63 6b 3a |/*. ab|s_check:|
|00001410| 20 76 65 72 69 66 79 20 | 74 68 61 74 20 74 68 65 | verify |that the|
|00001420| 20 76 61 6c 75 65 20 68 | 61 73 20 6e 6f 74 20 63 | value h|as not c|
|00001430| 68 61 6e 67 65 64 20 6d | 6f 72 65 20 74 68 61 6e |hanged m|ore than|
|00001440| 20 74 68 65 0a 20 20 20 | 61 6c 6c 6f 77 65 64 20 | the. |allowed |
|00001450| 61 62 73 6f 6c 75 74 65 | 20 61 6d 6f 75 6e 74 2e |absolute| amount.|
|00001460| 0a 0a 20 20 20 4b 65 6e | 6e 65 74 68 20 49 6e 67 |.. Ken|neth Ing|
|00001470| 68 61 6d 0a 0a 20 20 20 | 43 6f 70 79 72 69 67 68 |ham.. |Copyrigh|
|00001480| 74 20 28 43 29 20 31 39 | 38 38 20 54 68 65 20 55 |t (C) 19|88 The U|
|00001490| 6e 69 76 65 72 73 69 74 | 79 20 6f 66 20 4e 65 77 |niversit|y of New|
|000014a0| 20 4d 65 78 69 63 6f 0a | 2a 2f 0a 0a 23 69 6e 63 | Mexico.|*/..#inc|
|000014b0| 6c 75 64 65 20 22 64 65 | 66 73 2e 68 22 0a 23 69 |lude "de|fs.h".#i|
|000014c0| 6e 63 6c 75 64 65 20 22 | 79 2e 74 61 62 2e 68 22 |nclude "|y.tab.h"|
|000014d0| 0a 0a 61 62 73 5f 63 68 | 65 63 6b 28 63 75 72 72 |..abs_ch|eck(curr|
|000014e0| 65 6e 74 2c 20 70 72 65 | 76 5f 76 61 6c 2c 20 61 |ent, pre|v_val, a|
|000014f0| 6c 6c 6f 77 61 62 6c 65 | 2c 20 63 6d 64 2c 20 6e |llowable|, cmd, n|
|00001500| 61 6d 65 2c 20 6c 69 6e | 65 29 0a 63 68 61 72 20 |ame, lin|e).char |
|00001510| 2a 63 75 72 72 65 6e 74 | 3b 0a 64 6f 75 62 6c 65 |*current|;.double|
|00001520| 20 61 6c 6c 6f 77 61 62 | 6c 65 3b 0a 73 74 72 75 | allowab|le;.stru|
|00001530| 63 74 20 65 76 65 72 79 | 74 68 69 6e 67 20 2a 70 |ct every|thing *p|
|00001540| 72 65 76 5f 76 61 6c 3b | 0a 63 68 61 72 20 2a 63 |rev_val;|.char *c|
|00001550| 6d 64 2c 20 2a 6e 61 6d | 65 2c 20 2a 6c 69 6e 65 |md, *nam|e, *line|
|00001560| 3b 0a 7b 0a 09 65 78 74 | 65 72 6e 20 69 6e 74 20 |;.{..ext|ern int |
|00001570| 6c 69 6e 65 5f 6f 6b 3b | 0a 09 64 6f 75 62 6c 65 |line_ok;|..double|
|00001580| 20 63 68 61 6e 67 65 2c | 20 70 72 65 76 69 6f 75 | change,| previou|
|00001590| 73 2c 20 76 61 6c 75 65 | 3b 0a 09 64 6f 75 62 6c |s, value|;..doubl|
|000015a0| 65 20 74 6f 5f 64 6f 75 | 62 6c 65 28 29 3b 0a 0a |e to_dou|ble();..|
|000015b0| 09 70 72 65 76 69 6f 75 | 73 20 3d 20 74 6f 5f 64 |.previou|s = to_d|
|000015c0| 6f 75 62 6c 65 28 70 72 | 65 76 5f 76 61 6c 29 3b |ouble(pr|ev_val);|
|000015d0| 0a 09 76 61 6c 75 65 20 | 3d 20 61 74 6f 66 28 63 |..value |= atof(c|
|000015e0| 75 72 72 65 6e 74 29 3b | 0a 0a 09 63 68 61 6e 67 |urrent);|...chang|
|000015f0| 65 20 3d 20 76 61 6c 75 | 65 20 2d 20 70 72 65 76 |e = valu|e - prev|
|00001600| 69 6f 75 73 3b 0a 09 69 | 66 20 28 63 68 61 6e 67 |ious;..i|f (chang|
|00001610| 65 20 3e 20 61 6c 6c 6f | 77 61 62 6c 65 29 20 7b |e > allo|wable) {|
|00001620| 0a 09 09 69 66 20 28 6c | 69 6e 65 5f 6f 6b 29 20 |...if (l|ine_ok) |
|00001630| 7b 0a 09 09 09 70 72 69 | 6e 74 66 28 22 25 73 20 |{....pri|ntf("%s |
|00001640| 68 61 64 20 25 73 20 63 | 68 61 6e 67 65 20 62 79 |had %s c|hange by|
|00001650| 20 6d 6f 72 65 20 74 68 | 61 6e 20 25 2e 32 66 2e | more th|an %.2f.|
|00001660| 5c 6e 22 2c 0a 09 09 09 | 09 63 6d 64 2c 20 6e 61 |\n",....|.cmd, na|
|00001670| 6d 65 2c 20 61 6c 6c 6f | 77 61 62 6c 65 29 3b 0a |me, allo|wable);.|
|00001680| 09 09 09 70 72 69 6e 74 | 66 28 22 25 73 5c 6e 22 |...print|f("%s\n"|
|00001690| 2c 6c 69 6e 65 29 3b 0a | 09 09 7d 0a 09 09 65 6c |,line);.|..}...el|
|000016a0| 73 65 20 7b 0a 09 09 09 | 70 72 69 6e 74 66 28 22 |se {....|printf("|
|000016b0| 41 6c 73 6f 2c 20 69 74 | 20 68 61 64 20 25 73 20 |Also, it| had %s |
|000016c0| 63 68 61 6e 67 65 20 62 | 79 20 6d 6f 72 65 20 74 |change b|y more t|
|000016d0| 68 61 6e 20 25 2e 32 66 | 2e 5c 6e 22 2c 0a 09 09 |han %.2f|.\n",...|
|000016e0| 09 09 6e 61 6d 65 2c 20 | 61 6c 6c 6f 77 61 62 6c |..name, |allowabl|
|000016f0| 65 29 3b 0a 09 09 7d 0a | 09 09 70 72 69 6e 74 66 |e);...}.|..printf|
|00001700| 28 22 50 72 65 76 69 6f | 75 73 20 76 61 6c 75 65 |("Previo|us value|
|00001710| 20 25 2e 32 66 3b 20 22 | 2c 70 72 65 76 69 6f 75 | %.2f; "|,previou|
|00001720| 73 29 3b 0a 09 09 70 72 | 69 6e 74 66 28 22 63 75 |s);...pr|intf("cu|
|00001730| 72 72 65 6e 74 20 76 61 | 6c 75 65 20 25 2e 32 66 |rrent va|lue %.2f|
|00001740| 2e 5c 6e 22 2c 20 76 61 | 6c 75 65 29 3b 0a 09 09 |.\n", va|lue);...|
|00001750| 6c 69 6e 65 5f 6f 6b 20 | 3d 20 46 61 6c 73 65 3b |line_ok |= False;|
|00001760| 0a 09 7d 0a 7d 0a 20 69 | 6e 67 68 61 6d 40 75 6e |..}.}. i|ngham@un|
|00001770| 6d 62 09 09 0a 55 73 65 | 6e 65 74 3a 20 20 20 7b |mb...Use|net: {|
|00001780| 63 6f 6e 76 65 78 2c 75 | 63 62 76 61 78 2c 67 61 |convex,u|cbvax,ga|
|00001790| 74 65 63 68 7d 21 75 6e | 6d 76 61 78 21 61 72 69 |tech}!un|mvax!ari|
|000017a0| 65 6c 21 69 6e 67 68 61 | 6d 0a 00 00 00 00 00 00 |el!ingha|m.......|
|000017b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001800| 61 6e 79 5f 63 68 65 63 | 6b 2e 63 00 00 00 00 00 |any_chec|k.c.....|
|00001810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001860| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00001870| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00001880| 30 30 30 31 32 31 33 00 | 30 34 34 36 33 34 31 35 |0001213.|04463415|
|00001890| 30 35 35 00 30 31 30 31 | 30 36 00 20 30 00 00 00 |055.0101|06. 0...|
|000018a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001900| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00001910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001950| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00001960| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00001970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a00| 2f 2a 0a 20 20 20 61 6e | 79 5f 63 68 65 63 6b 3a |/*. an|y_check:|
|00001a10| 20 63 68 65 63 6b 20 61 | 20 76 61 6c 75 65 20 61 | check a| value a|
|00001a20| 6e 64 20 6d 61 6b 65 20 | 73 75 72 65 20 69 74 20 |nd make |sure it |
|00001a30| 68 61 73 20 6e 6f 74 20 | 63 68 61 6e 67 65 64 20 |has not |changed |
|00001a40| 61 74 20 61 6c 6c 2e 0a | 0a 20 20 20 4b 65 6e 6e |at all..|. Kenn|
|00001a50| 65 74 68 20 49 6e 67 68 | 61 6d 0a 0a 20 20 20 43 |eth Ingh|am.. C|
|00001a60| 6f 70 79 72 69 67 68 74 | 20 28 43 29 20 31 39 38 |opyright| (C) 198|
|00001a70| 38 20 54 68 65 20 55 6e | 69 76 65 72 73 69 74 79 |8 The Un|iversity|
|00001a80| 20 6f 66 20 4e 65 77 20 | 4d 65 78 69 63 6f 0a 2a | of New |Mexico.*|
|00001a90| 2f 0a 0a 23 69 6e 63 6c | 75 64 65 20 22 64 65 66 |/..#incl|ude "def|
|00001aa0| 73 2e 68 22 0a 0a 61 6e | 79 5f 63 68 65 63 6b 28 |s.h"..an|y_check(|
|00001ab0| 76 61 6c 75 65 2c 20 6c | 61 73 74 2c 20 63 6d 64 |value, l|ast, cmd|
|00001ac0| 2c 20 6e 61 6d 65 2c 20 | 6c 69 6e 65 29 0a 63 68 |, name, |line).ch|
|00001ad0| 61 72 20 2a 76 61 6c 75 | 65 3b 0a 73 74 72 75 63 |ar *valu|e;.struc|
|00001ae0| 74 20 65 76 65 72 79 74 | 68 69 6e 67 20 2a 6c 61 |t everyt|hing *la|
|00001af0| 73 74 3b 0a 63 68 61 72 | 20 2a 63 6d 64 2c 20 2a |st;.char| *cmd, *|
|00001b00| 6e 61 6d 65 2c 20 2a 6c | 69 6e 65 3b 0a 7b 0a 09 |name, *l|ine;.{..|
|00001b10| 65 78 74 65 72 6e 20 69 | 6e 74 20 6c 69 6e 65 5f |extern i|nt line_|
|00001b20| 6f 6b 3b 0a 09 63 68 61 | 72 20 2a 74 6f 5f 73 74 |ok;..cha|r *to_st|
|00001b30| 72 69 6e 67 28 29 2c 20 | 2a 70 72 65 76 69 6f 75 |ring(), |*previou|
|00001b40| 73 3b 0a 0a 09 70 72 65 | 76 69 6f 75 73 20 3d 20 |s;...pre|vious = |
|00001b50| 74 6f 5f 73 74 72 69 6e | 67 28 6c 61 73 74 29 3b |to_strin|g(last);|
|00001b60| 0a 09 69 66 20 28 73 74 | 72 63 6d 70 28 76 61 6c |..if (st|rcmp(val|
|00001b70| 75 65 2c 20 70 72 65 76 | 69 6f 75 73 29 20 21 3d |ue, prev|ious) !=|
|00001b80| 20 30 29 20 7b 0a 09 09 | 69 66 20 28 6c 69 6e 65 | 0) {...|if (line|
|00001b90| 5f 6f 6b 29 20 7b 0a 09 | 09 09 70 72 69 6e 74 66 |_ok) {..|..printf|
|00001ba0| 28 22 25 73 20 68 61 73 | 20 61 20 76 61 6c 75 65 |("%s has| a value|
|00001bb0| 20 77 68 69 63 68 20 63 | 68 61 6e 67 65 64 3a 5c | which c|hanged:\|
|00001bc0| 6e 22 2c 20 63 6d 64 29 | 3b 0a 09 09 09 70 72 69 |n", cmd)|;....pri|
|00001bd0| 6e 74 66 28 22 25 73 5c | 6e 22 2c 6c 69 6e 65 29 |ntf("%s\|n",line)|
|00001be0| 3b 0a 09 09 7d 0a 09 09 | 65 6c 73 65 0a 09 09 09 |;...}...|else....|
|00001bf0| 70 72 69 6e 74 66 28 22 | 41 6c 73 6f 2c 20 69 74 |printf("|Also, it|
|00001c00| 20 68 61 64 20 61 20 73 | 74 72 69 6e 67 20 76 61 | had a s|tring va|
|00001c10| 6c 75 65 20 63 68 61 6e | 67 65 3a 5c 6e 22 29 3b |lue chan|ge:\n");|
|00001c20| 0a 0a 09 09 70 72 69 6e | 74 66 28 22 77 68 65 72 |....prin|tf("wher|
|00001c30| 65 20 25 73 20 3d 20 27 | 25 73 27 3b 20 69 74 20 |e %s = '|%s'; it |
|00001c40| 77 61 73 20 27 25 73 27 | 22 2c 20 6e 61 6d 65 2c |was '%s'|", name,|
|00001c50| 20 76 61 6c 75 65 2c 20 | 70 72 65 76 69 6f 75 73 | value, |previous|
|00001c60| 29 3b 0a 09 09 70 72 69 | 6e 74 66 28 22 5c 6e 22 |);...pri|ntf("\n"|
|00001c70| 29 3b 0a 09 09 6c 69 6e | 65 5f 6f 6b 20 3d 20 46 |);...lin|e_ok = F|
|00001c80| 61 6c 73 65 3b 0a 09 7d | 0a 7d 0a 29 20 7b 0a 09 |alse;..}|.}.) {..|
|00001c90| 09 09 73 74 72 5b 69 5d | 20 3d 20 63 3b 0a 09 09 |..str[i]| = c;...|
|00001ca0| 09 63 20 3d 20 67 65 74 | 63 68 61 72 28 29 3b 0a |.c = get|char();.|
|00001cb0| 09 09 7d 0a 09 09 73 74 | 72 5b 69 5d 20 3d 20 27 |..}...st|r[i] = '|
|00001cc0| 5c 30 27 3b 0a 09 09 69 | 66 20 28 63 20 3d 3d 20 |\0';...i|f (c == |
|00001cd0| 45 4f 46 29 20 7b 0a 09 | 09 09 66 70 72 69 6e 74 |EOF) {..|..fprint|
|00001ce0| 66 28 73 74 64 65 72 72 | 2c 20 22 4d 69 73 73 69 |f(stderr|, "Missi|
|00001cf0| 6e 67 20 27 29 27 20 74 | 6f 20 65 6e 64 20 70 69 |ng ')' t|o end pi|
|00001d00| 70 65 6c 69 6e 65 2e 5c | 6e 22 29 3b 0a 09 09 09 |peline.\|n");....|
|00001d10| 72 65 74 75 72 6e 20 45 | 4f 46 3b 0a 09 09 7d 0a |return E|OF;...}.|
|00001d20| 09 09 79 79 6c 76 61 6c | 2e 73 74 72 20 3d 20 73 |..yylval|.str = s|
|00001d30| 74 72 73 61 76 65 28 73 | 74 72 29 3b 0a 09 09 72 |trsave(s|tr);...r|
|00001d40| 65 74 75 72 6e 20 50 49 | 50 45 4c 49 4e 45 3b 0a |eturn PI|PELINE;.|
|00001d50| 09 7d 0a 0a 09 69 66 20 | 28 63 20 3d 3d 20 27 23 |.}...if |(c == '#|
|00001d60| 27 29 20 7b 20 2f 2a 20 | 63 6f 6d 6d 65 6e 74 20 |') { /* |comment |
|00001d70| 74 6f 20 65 6e 64 20 6f | 66 20 6c 69 6e 65 20 2a |to end o|f line *|
|00001d80| 2f 0a 09 09 77 68 69 6c | 65 20 28 63 20 21 3d 20 |/...whil|e (c != |
|00001d90| 27 5c 6e 27 20 26 26 20 | 63 20 21 3d 20 45 4f 46 |'\n' && |c != EOF|
|00001da0| 29 0a 09 09 09 63 20 3d | 20 67 65 74 63 68 61 72 |)....c =| getchar|
|00001db0| 28 29 3b 0a 09 09 69 66 | 20 28 63 20 3d 3d 20 45 |();...if| (c == E|
|00001dc0| 4f 46 29 0a 09 09 09 72 | 65 74 75 72 6e 20 45 4f |OF)....r|eturn EO|
|00001dd0| 46 3b 0a 09 09 72 65 74 | 75 72 6e 20 79 79 6c 65 |F;...ret|urn yyle|
|00001de0| 78 28 29 3b 0a 09 7d 0a | 0a 09 69 66 20 28 69 6e |x();..}.|..if (in|
|00001df0| 64 65 78 28 77 6f 72 64 | 73 2c 20 63 29 20 21 3d |dex(word|s, c) !=|
|00001e00| 62 61 64 65 72 72 2e 63 | 00 00 00 00 00 00 00 00 |baderr.c|........|
|00001e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e60| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00001e70| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00001e80| 30 30 30 31 31 35 31 00 | 30 34 34 35 37 34 34 37 |0001151.|04457447|
|00001e90| 35 33 37 00 30 30 37 34 | 33 37 00 20 30 00 00 00 |537.0074|37. 0...|
|00001ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f00| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00001f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f50| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00001f60| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00001f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002000| 2f 2a 20 0a 20 20 20 62 | 61 64 65 72 72 3a 20 41 |/* . b|aderr: A|
|00002010| 20 62 61 64 20 65 72 72 | 6f 72 20 68 61 73 20 62 | bad err|or has b|
|00002020| 65 65 6e 20 63 61 75 67 | 68 74 2e 20 20 50 72 69 |een caug|ht. Pri|
|00002030| 6e 74 20 61 6e 20 65 72 | 72 6f 72 20 6d 65 73 73 |nt an er|ror mess|
|00002040| 61 67 65 20 65 78 70 6c | 61 69 6e 69 6e 67 0a 09 |age expl|aining..|
|00002050| 77 68 79 20 77 65 20 61 | 72 65 20 64 79 69 6e 67 |why we a|re dying|
|00002060| 2c 20 74 68 65 6e 20 65 | 78 69 74 2e 0a 0a 20 20 |, then e|xit... |
|00002070| 20 41 73 73 75 6d 70 74 | 69 6f 6e 73 3a 0a 09 74 | Assumpt|ions:..t|
|00002080| 68 65 20 73 69 67 6e 61 | 6c 20 6e 75 6d 62 65 72 |he signa|l number|
|00002090| 20 69 6e 20 73 69 67 20 | 69 73 20 61 6e 20 61 63 | in sig |is an ac|
|000020a0| 74 75 61 6c 20 73 69 67 | 6e 61 6c 20 6e 75 6d 62 |tual sig|nal numb|
|000020b0| 65 72 20 61 6e 64 20 68 | 61 73 20 61 6e 0a 09 65 |er and h|as an..e|
|000020c0| 6e 74 72 79 20 69 6e 20 | 73 79 73 5f 73 69 67 6c |ntry in |sys_sigl|
|000020d0| 69 73 74 20 28 42 53 44 | 20 4f 4e 4c 59 29 2e 0a |ist (BSD| ONLY)..|
|000020e0| 0a 20 20 20 41 72 67 75 | 6d 65 6e 74 73 3a 0a 09 |. Argu|ments:..|
|000020f0| 73 69 67 3a 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |sig: the| number |
|00002100| 6f 66 20 74 68 65 20 73 | 69 67 6e 61 6c 20 77 68 |of the s|ignal wh|
|00002110| 69 63 68 20 62 72 6f 75 | 67 68 74 20 75 73 20 68 |ich brou|ght us h|
|00002120| 65 72 65 2e 0a 0a 20 20 | 20 41 75 74 68 6f 72 3a |ere... | Author:|
|00002130| 0a 09 4b 65 6e 6e 65 74 | 68 20 49 6e 67 68 61 6d |..Kennet|h Ingham|
|00002140| 0a 0a 20 20 20 43 6f 70 | 79 72 69 67 68 74 20 28 |.. Cop|yright (|
|00002150| 43 29 20 31 39 38 37 20 | 54 68 65 20 55 6e 69 76 |C) 1987 |The Univ|
|00002160| 65 72 73 69 74 79 20 6f | 66 20 4e 65 77 20 4d 65 |ersity o|f New Me|
|00002170| 78 69 63 6f 0a 2a 2f 0a | 0a 23 69 6e 63 6c 75 64 |xico.*/.|.#includ|
|00002180| 65 20 22 64 65 66 73 2e | 68 22 0a 0a 62 61 64 65 |e "defs.|h"..bade|
|00002190| 72 72 28 73 69 67 29 0a | 69 6e 74 20 73 69 67 3b |rr(sig).|int sig;|
|000021a0| 0a 7b 0a 23 69 66 64 65 | 66 20 42 53 44 0a 09 65 |.{.#ifde|f BSD..e|
|000021b0| 78 74 65 72 6e 20 63 68 | 61 72 20 2a 73 79 73 5f |xtern ch|ar *sys_|
|000021c0| 73 69 67 6c 69 73 74 5b | 5d 3b 0a 0a 09 70 72 69 |siglist[|];...pri|
|000021d0| 6e 74 66 28 22 3e 3e 20 | 55 6e 72 65 63 6f 76 65 |ntf(">> |Unrecove|
|000021e0| 72 61 62 6c 65 20 65 72 | 72 6f 72 2e 20 20 25 73 |rable er|ror. %s|
|000021f0| 20 20 42 79 65 2e 20 3c | 3c 5c 6e 22 2c 73 79 73 | Bye. <|<\n",sys|
|00002200| 5f 73 69 67 6c 69 73 74 | 5b 73 69 67 5d 29 3b 0a |_siglist|[sig]);.|
|00002210| 23 65 6c 73 65 0a 09 70 | 72 69 6e 74 66 28 22 3e |#else..p|rintf(">|
|00002220| 3e 20 55 6e 72 65 63 6f | 76 65 72 61 62 6c 65 20 |> Unreco|verable |
|00002230| 65 72 72 6f 72 2e 20 20 | 53 69 67 6e 61 6c 20 25 |error. |Signal %|
|00002240| 64 2e 20 20 42 79 65 2e | 20 3c 3c 5c 6e 22 2c 20 |d. Bye.| <<\n", |
|00002250| 73 69 67 29 3b 0a 23 65 | 6e 64 69 66 0a 09 65 78 |sig);.#e|ndif..ex|
|00002260| 69 74 28 31 29 3b 0a 7d | 0a 30 00 00 30 31 31 36 |it(1);.}|.0..0116|
|00002270| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00002280| 30 30 30 31 35 34 36 00 | 30 34 34 36 35 37 32 36 |0001546.|04465726|
|00002290| 35 31 37 00 30 31 30 31 | 30 37 00 20 30 00 00 00 |517.0101|07. 0...|
|000022a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002300| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00002310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002350| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00002360| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00002370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002400| 62 75 69 6c 64 5f 61 62 | 73 2e 63 00 00 00 00 00 |build_ab|s.c.....|
|00002410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002460| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00002470| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00002480| 30 30 30 30 37 35 35 00 | 30 34 34 36 35 37 32 35 |0000755.|04465725|
|00002490| 30 37 33 00 30 31 30 31 | 32 36 00 20 30 00 00 00 |073.0101|26. 0...|
|000024a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002500| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00002510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002550| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00002560| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00002570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002600| 2f 2a 0a 20 20 20 62 75 | 69 6c 64 5f 61 62 73 3a |/*. bu|ild_abs:|
|00002610| 20 62 75 69 6c 64 20 61 | 6e 20 61 62 73 6f 6c 75 | build a|n absolu|
|00002620| 74 65 20 63 68 61 6e 67 | 65 20 66 6f 72 6d 61 74 |te chang|e format|
|00002630| 20 66 6f 72 20 74 68 65 | 20 70 61 72 73 65 72 2e | for the| parser.|
|00002640| 0a 0a 20 20 20 4b 65 6e | 6e 65 74 68 20 49 6e 67 |.. Ken|neth Ing|
|00002650| 68 61 6d 0a 0a 20 20 20 | 43 6f 70 79 72 69 67 68 |ham.. |Copyrigh|
|00002660| 74 20 28 43 29 20 31 39 | 38 38 20 54 68 65 20 55 |t (C) 19|88 The U|
|00002670| 6e 69 76 65 72 73 69 74 | 79 20 6f 66 20 4e 65 77 |niversit|y of New|
|00002680| 20 4d 65 78 69 63 6f 0a | 2a 2f 0a 0a 23 69 6e 63 | Mexico.|*/..#inc|
|00002690| 6c 75 64 65 20 22 64 65 | 66 73 2e 68 22 0a 23 69 |lude "de|fs.h".#i|
|000026a0| 6e 63 6c 75 64 65 20 22 | 79 2e 74 61 62 2e 68 22 |nclude "|y.tab.h"|
|000026b0| 0a 0a 73 74 72 75 63 74 | 20 63 68 61 6e 67 65 5f |..struct| change_|
|000026c0| 66 6d 74 5f 73 74 20 2a | 0a 62 75 69 6c 64 5f 61 |fmt_st *|.build_a|
|000026d0| 62 73 28 73 74 72 69 6e | 67 2c 20 6e 75 6d 62 65 |bs(strin|g, numbe|
|000026e0| 72 29 0a 73 74 72 75 63 | 74 20 6e 75 6d 62 65 72 |r).struc|t number|
|000026f0| 20 2a 6e 75 6d 62 65 72 | 3b 0a 63 68 61 72 20 2a | *number|;.char *|
|00002700| 73 74 72 69 6e 67 3b 0a | 7b 0a 09 73 74 72 75 63 |string;.|{..struc|
|00002710| 74 20 63 68 61 6e 67 65 | 5f 66 6d 74 5f 73 74 20 |t change|_fmt_st |
|00002720| 2a 70 3b 0a 0a 09 70 20 | 3d 20 61 6c 6c 6f 63 61 |*p;...p |= alloca|
|00002730| 74 65 28 73 74 72 75 63 | 74 20 63 68 61 6e 67 65 |te(struc|t change|
|00002740| 5f 66 6d 74 5f 73 74 29 | 3b 0a 09 70 2d 3e 6e 61 |_fmt_st)|;..p->na|
|00002750| 6d 65 20 3d 20 73 74 72 | 69 6e 67 3b 0a 09 70 2d |me = str|ing;..p-|
|00002760| 3e 66 6d 74 2e 66 6d 74 | 2e 61 62 73 5f 61 6d 6f |>fmt.fmt|.abs_amo|
|00002770| 75 6e 74 20 3d 20 6e 75 | 6d 62 65 72 2d 3e 74 79 |unt = nu|mber->ty|
|00002780| 70 65 20 3d 3d 20 49 4e | 54 45 47 45 52 20 3f 0a |pe == IN|TEGER ?.|
|00002790| 09 09 28 64 6f 75 62 6c | 65 29 6e 75 6d 62 65 72 |..(doubl|e)number|
|000027a0| 2d 3e 76 61 6c 75 65 2e | 69 6e 74 65 67 65 72 20 |->value.|integer |
|000027b0| 3a 20 6e 75 6d 62 65 72 | 2d 3e 76 61 6c 75 65 2e |: number|->value.|
|000027c0| 72 65 61 6c 3b 0a 09 70 | 2d 3e 66 6d 74 2e 74 79 |real;..p|->fmt.ty|
|000027d0| 70 65 20 3d 20 41 42 53 | 4f 4c 55 54 45 3b 0a 0a |pe = ABS|OLUTE;..|
|000027e0| 09 72 65 74 75 72 6e 20 | 70 3b 0a 7d 0a 00 00 00 |.return |p;.}....|
|000027f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002800| 62 75 69 6c 64 5f 61 6e | 79 2e 63 00 00 00 00 00 |build_an|y.c.....|
|00002810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002860| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00002870| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00002880| 30 30 30 30 35 33 36 00 | 30 34 34 35 37 34 34 37 |0000536.|04457447|
|00002890| 36 37 30 00 30 31 30 31 | 35 32 00 20 30 00 00 00 |670.0101|52. 0...|
|000028a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002900| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00002910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002950| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00002960| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00002970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002a00| 2f 2a 0a 20 20 20 62 75 | 69 6c 64 5f 61 6e 79 3a |/*. bu|ild_any:|
|00002a10| 20 62 75 69 6c 64 20 61 | 6e 20 61 6e 79 20 63 68 | build a|n any ch|
|00002a20| 61 6e 67 65 20 73 74 72 | 75 63 74 75 72 65 20 66 |ange str|ucture f|
|00002a30| 6f 72 20 74 68 65 20 70 | 61 72 73 65 72 2e 0a 0a |or the p|arser...|
|00002a40| 20 20 20 4b 65 6e 6e 65 | 74 68 20 49 6e 67 68 61 | Kenne|th Ingha|
|00002a50| 6d 0a 0a 20 20 20 43 70 | 79 72 69 67 68 74 20 28 |m.. Cp|yright (|
|00002a60| 43 29 20 31 39 38 38 20 | 54 68 65 20 55 6e 69 76 |C) 1988 |The Univ|
|00002a70| 76 65 72 73 69 74 79 20 | 6f 66 20 4e 65 77 20 4d |versity |of New M|
|00002a80| 65 78 69 63 6f 0a 2a 2f | 0a 0a 23 69 6e 63 6c 75 |exico.*/|..#inclu|
|00002a90| 64 65 20 22 64 65 66 73 | 2e 68 22 0a 23 69 6e 63 |de "defs|.h".#inc|
|00002aa0| 6c 75 64 65 20 22 79 2e | 74 61 62 2e 68 22 0a 0a |lude "y.|tab.h"..|
|00002ab0| 73 74 72 75 63 74 20 63 | 68 61 6e 67 65 5f 66 6d |struct c|hange_fm|
|00002ac0| 74 5f 73 74 20 2a 0a 62 | 75 69 6c 64 5f 61 6e 79 |t_st *.b|uild_any|
|00002ad0| 28 73 74 72 69 6e 67 29 | 0a 63 68 61 72 20 2a 73 |(string)|.char *s|
|00002ae0| 74 72 69 6e 67 3b 0a 7b | 0a 09 73 74 72 75 63 74 |tring;.{|..struct|
|00002af0| 20 63 68 61 6e 67 65 5f | 66 6d 74 5f 73 74 20 2a | change_|fmt_st *|
|00002b00| 70 3b 0a 0a 09 70 20 3d | 20 61 6c 6c 6f 63 61 74 |p;...p =| allocat|
|00002b10| 65 28 73 74 72 75 63 74 | 20 63 68 61 6e 67 65 5f |e(struct| change_|
|00002b20| 66 6d 74 5f 73 74 29 3b | 0a 09 70 2d 3e 6e 61 6d |fmt_st);|..p->nam|
|00002b30| 65 20 3d 20 73 74 72 69 | 6e 67 3b 0a 09 70 2d 3e |e = stri|ng;..p->|
|00002b40| 66 6d 74 2e 74 79 70 65 | 20 3d 20 41 4e 59 3b 0a |fmt.type| = ANY;.|
|00002b50| 0a 09 72 65 74 75 72 6e | 20 70 3b 0a 7d 0a 29 3b |..return| p;.}.);|
|00002b60| 0a 09 69 66 20 28 73 74 | 72 63 6d 70 28 76 61 6c |..if (st|rcmp(val|
|00002b70| 75 65 2c 20 70 72 65 76 | 69 6f 75 73 29 20 21 3d |ue, prev|ious) !=|
|00002b80| 20 30 29 20 7b 0a 09 09 | 69 66 20 28 6c 69 6e 65 | 0) {...|if (line|
|00002b90| 5f 6f 6b 29 20 7b 0a 09 | 09 09 70 72 69 6e 74 66 |_ok) {..|..printf|
|00002ba0| 28 22 25 73 20 68 61 73 | 20 61 20 76 61 6c 75 65 |("%s has| a value|
|00002bb0| 20 77 68 69 63 68 20 63 | 68 61 6e 67 65 64 3a 5c | which c|hanged:\|
|00002bc0| 6e 22 2c 20 63 6d 64 29 | 3b 0a 09 09 09 70 72 69 |n", cmd)|;....pri|
|00002bd0| 6e 74 66 28 22 25 73 5c | 6e 22 2c 6c 69 6e 65 29 |ntf("%s\|n",line)|
|00002be0| 3b 0a 09 09 7d 0a 09 09 | 65 6c 73 65 0a 09 09 09 |;...}...|else....|
|00002bf0| 70 72 69 6e 74 66 28 22 | 41 6c 73 6f 2c 20 69 74 |printf("|Also, it|
|00002c00| 62 75 69 6c 64 5f 63 6d | 64 2e 63 00 00 00 00 00 |build_cm|d.c.....|
|00002c10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c60| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00002c70| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00002c80| 30 30 30 31 30 37 36 00 | 30 34 34 36 33 34 31 36 |0001076.|04463416|
|00002c90| 35 31 35 00 30 31 30 31 | 31 35 00 20 30 00 00 00 |515.0101|15. 0...|
|00002ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d00| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00002d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d50| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00002d60| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00002d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e00| 2f 2a 0a 20 20 20 62 75 | 69 6c 64 5f 63 6d 64 3a |/*. bu|ild_cmd:|
|00002e10| 20 62 75 69 6c 64 20 6f | 6e 65 20 63 6f 6d 6d 61 | build o|ne comma|
|00002e20| 6e 64 20 73 74 72 75 63 | 74 75 72 65 20 66 72 6f |nd struc|ture fro|
|00002e30| 6d 20 74 68 65 20 70 69 | 65 63 65 73 20 70 72 6f |m the pi|eces pro|
|00002e40| 76 69 64 65 64 2e 0a 0a | 20 20 20 4b 65 6e 6e 65 |vided...| Kenne|
|00002e50| 74 68 20 49 6e 67 68 61 | 6d 0a 0a 20 20 20 43 6f |th Ingha|m.. Co|
|00002e60| 70 79 72 69 67 68 74 20 | 28 43 29 20 31 39 38 38 |pyright |(C) 1988|
|00002e70| 20 54 68 65 20 55 6e 69 | 76 65 72 73 69 74 79 20 | The Uni|versity |
|00002e80| 6f 66 20 4e 65 77 20 4d | 65 78 69 63 6f 0a 2a 2f |of New M|exico.*/|
|00002e90| 0a 0a 23 69 6e 63 6c 75 | 64 65 20 22 64 65 66 73 |..#inclu|de "defs|
|00002ea0| 2e 68 22 0a 23 69 6e 63 | 6c 75 64 65 20 22 79 2e |.h".#inc|lude "y.|
|00002eb0| 74 61 62 2e 68 22 0a 0a | 73 74 72 75 63 74 20 63 |tab.h"..|struct c|
|00002ec0| 6d 64 5f 73 74 20 2a 0a | 62 75 69 6c 64 5f 63 6d |md_st *.|build_cm|
|00002ed0| 64 28 70 69 70 65 6c 69 | 6e 65 2c 20 61 6c 69 61 |d(pipeli|ne, alia|
|00002ee0| 73 2c 20 6f 75 74 5f 66 | 6d 74 2c 20 63 68 61 6e |s, out_f|mt, chan|
|00002ef0| 67 65 5f 66 6d 74 29 0a | 63 68 61 72 20 2a 61 6c |ge_fmt).|char *al|
|00002f00| 69 61 73 2c 20 2a 70 69 | 70 65 6c 69 6e 65 3b 0a |ias, *pi|peline;.|
|00002f10| 73 74 72 75 63 74 20 6f | 75 74 5f 66 6d 74 5f 73 |struct o|ut_fmt_s|
|00002f20| 74 20 2a 6f 75 74 5f 66 | 6d 74 3b 0a 73 74 72 75 |t *out_f|mt;.stru|
|00002f30| 63 74 20 63 68 61 6e 67 | 65 5f 66 6d 74 5f 73 74 |ct chang|e_fmt_st|
|00002f40| 20 2a 63 68 61 6e 67 65 | 5f 66 6d 74 3b 0a 7b 0a | *change|_fmt;.{.|
|00002f50| 09 65 78 74 65 72 6e 20 | 73 74 72 75 63 74 20 6f |.extern |struct o|
|00002f60| 75 74 5f 66 6d 74 5f 73 | 74 20 2a 6b 65 79 3b 0a |ut_fmt_s|t *key;.|
|00002f70| 09 73 74 72 75 63 74 20 | 63 6d 64 5f 73 74 20 2a |.struct |cmd_st *|
|00002f80| 70 3b 0a 0a 09 70 20 3d | 20 61 6c 6c 6f 63 61 74 |p;...p =| allocat|
|00002f90| 65 28 73 74 72 75 63 74 | 20 63 6d 64 5f 73 74 29 |e(struct| cmd_st)|
|00002fa0| 3b 0a 0a 09 70 2d 3e 70 | 69 70 65 6c 69 6e 65 20 |;...p->p|ipeline |
|00002fb0| 3d 20 70 69 70 65 6c 69 | 6e 65 3b 0a 09 70 2d 3e |= pipeli|ne;..p->|
|00002fc0| 61 6c 69 61 73 20 3d 20 | 61 6c 69 61 73 3b 0a 09 |alias = |alias;..|
|00002fd0| 70 2d 3e 63 68 61 6e 67 | 65 5f 66 6d 74 20 3d 20 |p->chang|e_fmt = |
|00002fe0| 63 68 61 6e 67 65 5f 66 | 6d 74 3b 0a 09 70 2d 3e |change_f|mt;..p->|
|00002ff0| 6e 65 78 74 20 3d 20 4e | 55 4c 4c 3b 0a 09 70 2d |next = N|ULL;..p-|
|00003000| 3e 6f 75 74 5f 66 6d 74 | 20 3d 20 6f 75 74 5f 66 |>out_fmt| = out_f|
|00003010| 6d 74 3b 0a 09 70 2d 3e | 6b 65 79 20 3d 20 6b 65 |mt;..p->|key = ke|
|00003020| 79 3b 0a 09 6b 65 79 20 | 3d 20 4e 55 4c 4c 3b 0a |y;..key |= NULL;.|
|00003030| 0a 09 72 65 74 75 72 6e | 20 70 3b 0a 7d 0a 73 73 |..return| p;.}.ss|
|00003040| 61 67 65 20 65 78 70 6c | 61 69 6e 69 6e 67 0a 09 |age expl|aining..|
|00003050| 77 68 79 20 77 65 20 61 | 72 65 20 64 79 69 6e 67 |why we a|re dying|
|00003060| 2c 20 74 68 65 6e 20 65 | 78 69 74 2e 0a 0a 20 20 |, then e|xit... |
|00003070| 20 41 73 73 75 6d 70 74 | 69 6f 6e 73 3a 0a 09 74 | Assumpt|ions:..t|
|00003080| 68 65 20 73 69 67 6e 61 | 6c 20 6e 75 6d 62 65 72 |he signa|l number|
|00003090| 20 69 6e 20 73 69 67 20 | 69 73 20 61 6e 20 61 63 | in sig |is an ac|
|000030a0| 74 75 61 6c 20 73 69 67 | 6e 61 6c 20 6e 75 6d 62 |tual sig|nal numb|
|000030b0| 65 72 20 61 6e 64 20 68 | 61 73 20 61 6e 0a 09 65 |er and h|as an..e|
|000030c0| 6e 74 72 79 20 69 6e 20 | 73 79 73 5f 73 69 67 6c |ntry in |sys_sigl|
|000030d0| 69 73 74 20 28 42 53 44 | 20 4f 4e 4c 59 29 2e 0a |ist (BSD| ONLY)..|
|000030e0| 0a 20 20 20 41 72 67 75 | 6d 65 6e 74 73 3a 0a 09 |. Argu|ments:..|
|000030f0| 73 69 67 3a 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |sig: the| number |
|00003100| 6f 66 20 74 68 65 20 73 | 69 67 6e 61 6c 20 77 68 |of the s|ignal wh|
|00003110| 69 63 68 20 62 72 6f 75 | 67 68 74 20 75 73 20 68 |ich brou|ght us h|
|00003120| 65 72 65 2e 0a 0a 20 20 | 20 41 75 74 68 6f 72 3a |ere... | Author:|
|00003130| 0a 09 4b 65 6e 6e 65 74 | 68 20 49 6e 67 68 61 6d |..Kennet|h Ingham|
|00003140| 0a 0a 20 20 20 43 6f 70 | 79 72 69 67 68 74 20 28 |.. Cop|yright (|
|00003150| 43 29 20 31 39 38 37 20 | 54 68 65 20 55 6e 69 76 |C) 1987 |The Univ|
|00003160| 65 72 73 69 74 79 20 6f | 66 20 4e 65 77 20 4d 65 |ersity o|f New Me|
|00003170| 78 69 63 6f 0a 2a 2f 0a | 0a 23 69 6e 63 6c 75 64 |xico.*/.|.#includ|
|00003180| 65 20 22 64 65 66 73 2e | 68 22 0a 0a 62 61 64 65 |e "defs.|h"..bade|
|00003190| 72 72 28 73 69 67 29 0a | 69 6e 74 20 73 69 67 3b |rr(sig).|int sig;|
|000031a0| 0a 7b 0a 23 69 66 64 65 | 66 20 42 53 44 0a 09 65 |.{.#ifde|f BSD..e|
|000031b0| 78 74 65 72 6e 20 63 68 | 61 72 20 2a 73 79 73 5f |xtern ch|ar *sys_|
|000031c0| 73 69 67 6c 69 73 74 5b | 5d 3b 0a 0a 09 70 72 69 |siglist[|];...pri|
|000031d0| 6e 74 66 28 22 3e 3e 20 | 55 6e 72 65 63 6f 76 65 |ntf(">> |Unrecove|
|000031e0| 72 61 62 6c 65 20 65 72 | 72 6f 72 2e 20 20 25 73 |rable er|ror. %s|
|000031f0| 20 20 42 79 65 2e 20 3c | 3c 5c 6e 22 2c 73 79 73 | Bye. <|<\n",sys|
|00003200| 62 75 69 6c 64 5f 63 6f | 6c 2e 63 00 00 00 00 00 |build_co|l.c.....|
|00003210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003260| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00003270| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00003280| 30 30 30 32 33 35 36 00 | 30 34 34 35 37 34 34 37 |0002356.|04457447|
|00003290| 37 36 33 00 30 31 30 31 | 34 35 00 20 30 00 00 00 |763.0101|45. 0...|
|000032a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003300| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00003310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003350| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00003360| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00003370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003400| 2f 2a 0a 20 20 62 75 69 | 6c 64 5f 63 6f 6c 3a 20 |/*. bui|ld_col: |
|00003410| 62 75 69 6c 64 20 61 20 | 63 6f 6c 75 6d 6e 20 6f |build a |column o|
|00003420| 75 74 20 73 74 72 75 63 | 74 75 72 65 20 66 6f 72 |ut struc|ture for|
|00003430| 20 74 68 65 20 70 61 72 | 73 65 72 2e 0a 0a 20 20 | the par|ser... |
|00003440| 4b 65 6e 6e 65 74 68 20 | 49 6e 67 68 61 6d 0a 0a |Kenneth |Ingham..|
|00003450| 20 20 43 6f 70 79 72 69 | 67 68 74 20 28 43 29 20 | Copyri|ght (C) |
|00003460| 31 39 38 38 20 54 68 65 | 20 55 6e 69 76 65 72 73 |1988 The| Univers|
|00003470| 69 74 79 20 6f 66 20 4e | 65 77 20 4d 65 78 69 63 |ity of N|ew Mexic|
|00003480| 6f 0a 2a 2f 0a 0a 23 69 | 6e 63 6c 75 64 65 20 22 |o.*/..#i|nclude "|
|00003490| 64 65 66 73 2e 68 22 0a | 23 69 6e 63 6c 75 64 65 |defs.h".|#include|
|000034a0| 20 22 79 2e 74 61 62 2e | 68 22 0a 0a 73 74 72 75 | "y.tab.|h"..stru|
|000034b0| 63 74 20 63 6f 6c 5f 6f | 75 74 5f 73 74 20 2a 0a |ct col_o|ut_st *.|
|000034c0| 62 75 69 6c 64 5f 63 6f | 6c 28 73 74 61 72 74 2c |build_co|l(start,|
|000034d0| 20 65 6e 64 2c 20 6e 61 | 6d 65 2c 20 74 79 70 65 | end, na|me, type|
|000034e0| 29 0a 63 68 61 72 20 2a | 6e 61 6d 65 2c 20 2a 74 |).char *|name, *t|
|000034f0| 79 70 65 3b 0a 69 6e 74 | 20 73 74 61 72 74 2c 20 |ype;.int| start, |
|00003500| 65 6e 64 3b 0a 7b 0a 09 | 65 78 74 65 72 6e 20 73 |end;.{..|extern s|
|00003510| 74 72 75 63 74 20 6f 75 | 74 5f 66 6d 74 5f 73 74 |truct ou|t_fmt_st|
|00003520| 20 2a 6b 65 79 3b 0a 09 | 65 78 74 65 72 6e 20 69 | *key;..|extern i|
|00003530| 6e 74 20 70 61 72 73 65 | 5f 65 72 72 6f 72 3b 0a |nt parse|_error;.|
|00003540| 09 65 78 74 65 72 6e 20 | 63 68 61 72 20 2a 6d 79 |.extern |char *my|
|00003550| 6e 61 6d 65 3b 0a 09 73 | 74 72 75 63 74 20 63 6f |name;..s|truct co|
|00003560| 6c 5f 6f 75 74 5f 73 74 | 20 2a 70 3b 0a 0a 09 70 |l_out_st| *p;...p|
|00003570| 20 3d 20 61 6c 6c 6f 63 | 61 74 65 28 73 74 72 75 | = alloc|ate(stru|
|00003580| 63 74 20 63 6f 6c 5f 6f | 75 74 5f 73 74 29 3b 0a |ct col_o|ut_st);.|
|00003590| 09 70 2d 3e 6e 61 6d 65 | 20 3d 20 6e 61 6d 65 3b |.p->name| = name;|
|000035a0| 0a 09 70 2d 3e 73 74 61 | 72 74 20 3d 20 73 74 61 |..p->sta|rt = sta|
|000035b0| 72 74 3b 0a 09 70 2d 3e | 65 6e 64 20 3d 20 65 6e |rt;..p->|end = en|
|000035c0| 64 3b 0a 09 70 2d 3e 6e | 65 78 74 20 3d 20 4e 55 |d;..p->n|ext = NU|
|000035d0| 4c 4c 3b 0a 0a 09 69 66 | 20 28 74 79 70 65 5b 31 |LL;...if| (type[1|
|000035e0| 5d 20 21 3d 20 27 5c 30 | 27 20 7c 7c 20 69 6e 64 |] != '\0|' || ind|
|000035f0| 65 78 28 22 64 66 73 6b | 22 2c 20 74 79 70 65 5b |ex("dfsk|", type[|
|00003600| 30 5d 29 20 3d 3d 20 4e | 55 4c 4c 29 20 7b 0a 09 |0]) == N|ULL) {..|
|00003610| 09 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c |.fprintf|(stderr,|
|00003620| 22 25 73 3a 20 49 6e 76 | 61 6c 69 64 20 74 79 70 |"%s: Inv|alid typ|
|00003630| 65 20 73 70 65 63 69 66 | 69 65 72 20 22 2c 20 6d |e specif|ier ", m|
|00003640| 79 6e 61 6d 65 29 3b 0a | 09 09 66 70 72 69 6e 74 |yname);.|..fprint|
|00003650| 66 28 73 74 64 65 72 72 | 2c 22 27 25 73 27 20 66 |f(stderr|,"'%s' f|
|00003660| 6f 72 20 27 25 73 27 20 | 28 63 6f 6c 20 66 6d 74 |or '%s' |(col fmt|
|00003670| 29 2e 5c 6e 22 2c 20 74 | 79 70 65 2c 20 70 2d 3e |).\n", t|ype, p->|
|00003680| 6e 61 6d 65 29 3b 0a 09 | 09 66 70 72 69 6e 74 66 |name);..|.fprintf|
|00003690| 28 73 74 64 65 72 72 2c | 20 22 45 78 70 65 63 74 |(stderr,| "Expect|
|000036a0| 69 6e 67 20 6f 6e 65 20 | 6f 66 20 27 64 66 73 6b |ing one |of 'dfsk|
|000036b0| 27 5c 6e 22 29 3b 0a 09 | 09 70 61 72 73 65 5f 65 |'\n");..|.parse_e|
|000036c0| 72 72 6f 72 20 3d 20 54 | 72 75 65 3b 0a 09 09 72 |rror = T|rue;...r|
|000036d0| 65 74 75 72 6e 20 70 3b | 0a 09 7d 0a 0a 09 73 77 |eturn p;|..}...sw|
|000036e0| 69 74 63 68 20 28 2a 74 | 79 70 65 29 20 7b 0a 09 |itch (*t|ype) {..|
|000036f0| 09 63 61 73 65 20 27 64 | 27 3a 0a 09 09 09 70 2d |.case 'd|':....p-|
|00003700| 3e 74 79 70 65 20 3d 20 | 49 4e 54 45 47 45 52 3b |>type = |INTEGER;|
|00003710| 0a 09 09 09 62 72 65 61 | 6b 3b 0a 09 09 63 61 73 |....brea|k;...cas|
|00003720| 65 20 27 66 27 3a 0a 09 | 09 09 70 2d 3e 74 79 70 |e 'f':..|..p->typ|
|00003730| 65 20 3d 20 46 4c 4f 41 | 54 3b 0a 09 09 09 62 72 |e = FLOA|T;....br|
|00003740| 65 61 6b 3b 0a 09 09 63 | 61 73 65 20 27 73 27 3a |eak;...c|ase 's':|
|00003750| 0a 09 09 09 70 2d 3e 74 | 79 70 65 20 3d 20 53 54 |....p->t|ype = ST|
|00003760| 52 49 4e 47 3b 0a 09 09 | 09 62 72 65 61 6b 3b 0a |RING;...|.break;.|
|00003770| 09 09 63 61 73 65 20 27 | 6b 27 3a 0a 09 09 09 70 |..case '|k':....p|
|00003780| 2d 3e 74 79 70 65 20 3d | 20 4b 45 59 3b 0a 09 09 |->type =| KEY;...|
|00003790| 09 6b 65 79 20 3d 20 61 | 6c 6c 6f 63 61 74 65 28 |.key = a|llocate(|
|000037a0| 73 74 72 75 63 74 20 6f | 75 74 5f 66 6d 74 5f 73 |struct o|ut_fmt_s|
|000037b0| 74 29 3b 0a 09 09 09 6b | 65 79 2d 3e 6f 75 74 5f |t);....k|ey->out_|
|000037c0| 66 6d 74 2e 63 6f 6c 5f | 66 6d 74 20 3d 20 70 3b |fmt.col_|fmt = p;|
|000037d0| 0a 09 09 09 6b 65 79 2d | 3e 74 79 70 65 20 3d 20 |....key-|>type = |
|000037e0| 43 4f 4c 55 4d 4e 3b 0a | 09 09 09 62 72 65 61 6b |COLUMN;.|...break|
|000037f0| 3b 0a 09 09 64 65 66 61 | 75 6c 74 3a 0a 09 09 09 |;...defa|ult:....|
|00003800| 2f 2a 20 63 68 65 63 6b | 65 64 20 61 62 6f 76 65 |/* check|ed above|
|00003810| 20 69 6e 20 69 66 20 2a | 2f 0a 09 09 09 66 70 72 | in if *|/....fpr|
|00003820| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 22 49 6d 70 |intf(std|err,"Imp|
|00003830| 6f 73 73 69 62 6c 65 20 | 63 6f 6e 64 69 74 69 6f |ossible |conditio|
|00003840| 6e 20 69 6e 20 62 75 69 | 6c 64 5f 63 6f 6c 5c 6e |n in bui|ld_col\n|
|00003850| 22 29 3b 0a 09 09 09 65 | 78 69 74 28 31 29 3b 0a |");....e|xit(1);.|
|00003860| 09 7d 0a 0a 09 69 66 20 | 28 73 74 61 72 74 20 3e |.}...if |(start >|
|00003870| 20 65 6e 64 29 20 7b 0a | 09 09 66 70 72 69 6e 74 | end) {.|..fprint|
|00003880| 66 28 73 74 64 65 72 72 | 2c 22 25 73 3a 20 73 74 |f(stderr|,"%s: st|
|00003890| 61 72 74 20 25 64 20 6c | 61 72 67 65 72 20 74 68 |art %d l|arger th|
|000038a0| 61 6e 20 65 6e 64 20 25 | 64 21 5c 6e 22 2c 0a 09 |an end %|d!\n",..|
|000038b0| 09 09 6d 79 6e 61 6d 65 | 2c 20 73 74 61 72 74 2c |..myname|, start,|
|000038c0| 20 65 6e 64 29 3b 0a 09 | 09 70 61 72 73 65 5f 65 | end);..|.parse_e|
|000038d0| 72 72 6f 72 20 3d 20 54 | 72 75 65 3b 0a 09 7d 0a |rror = T|rue;..}.|
|000038e0| 0a 09 72 65 74 75 72 6e | 20 70 3b 0a 7d 0a 00 00 |..return| p;.}...|
|000038f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003900| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00003910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003950| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00003960| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00003970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a00| 62 75 69 6c 64 5f 6d 61 | 78 6d 69 6e 2e 63 00 00 |build_ma|xmin.c..|
|00003a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a60| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00003a70| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00003a80| 30 30 30 31 31 30 37 00 | 30 34 34 36 35 37 32 35 |0001107.|04465725|
|00003a90| 32 31 33 00 30 31 30 36 | 33 36 00 20 30 00 00 00 |213.0106|36. 0...|
|00003aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b00| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00003b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b50| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00003b60| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00003b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c00| 2f 2a 0a 20 20 20 62 75 | 69 6c 64 5f 6d 61 78 6d |/*. bu|ild_maxm|
|00003c10| 69 6e 3a 20 62 75 69 6c | 64 20 61 20 6d 61 78 2f |in: buil|d a max/|
|00003c20| 6d 69 6e 20 66 6f 72 6d | 61 74 20 66 6f 72 20 74 |min form|at for t|
|00003c30| 68 65 20 70 61 72 73 65 | 72 2e 0a 0a 20 20 20 4b |he parse|r... K|
|00003c40| 65 6e 6e 65 74 68 20 49 | 6e 67 68 61 6d 0a 0a 20 |enneth I|ngham.. |
|00003c50| 20 20 43 70 79 72 69 67 | 68 74 20 28 43 29 20 31 | Cpyrig|ht (C) 1|
|00003c60| 39 38 38 20 54 68 65 20 | 55 6e 69 76 76 65 72 73 |988 The |Univvers|
|00003c70| 69 74 79 20 6f 66 20 4e | 65 77 20 4d 65 78 69 63 |ity of N|ew Mexic|
|00003c80| 6f 0a 2a 2f 0a 0a 23 69 | 6e 63 6c 75 64 65 20 22 |o.*/..#i|nclude "|
|00003c90| 64 65 66 73 2e 68 22 0a | 23 69 6e 63 6c 75 64 65 |defs.h".|#include|
|00003ca0| 20 22 79 2e 74 61 62 2e | 68 22 0a 0a 73 74 72 75 | "y.tab.|h"..stru|
|00003cb0| 63 74 20 63 68 61 6e 67 | 65 5f 66 6d 74 5f 73 74 |ct chang|e_fmt_st|
|00003cc0| 20 2a 0a 62 75 69 6c 64 | 5f 6d 61 78 6d 69 6e 28 | *.build|_maxmin(|
|00003cd0| 73 74 72 69 6e 67 2c 20 | 6d 69 6e 2c 20 6d 61 78 |string, |min, max|
|00003ce0| 29 0a 73 74 72 75 63 74 | 20 6e 75 6d 62 65 72 20 |).struct| number |
|00003cf0| 2a 6d 61 78 2c 20 2a 6d | 69 6e 3b 0a 63 68 61 72 |*max, *m|in;.char|
|00003d00| 20 2a 73 74 72 69 6e 67 | 3b 0a 7b 0a 09 73 74 72 | *string|;.{..str|
|00003d10| 75 63 74 20 63 68 61 6e | 67 65 5f 66 6d 74 5f 73 |uct chan|ge_fmt_s|
|00003d20| 74 20 2a 70 3b 0a 0a 09 | 70 20 3d 20 61 6c 6c 6f |t *p;...|p = allo|
|00003d30| 63 61 74 65 28 73 74 72 | 75 63 74 20 63 68 61 6e |cate(str|uct chan|
|00003d40| 67 65 5f 66 6d 74 5f 73 | 74 29 3b 0a 09 70 2d 3e |ge_fmt_s|t);..p->|
|00003d50| 6e 61 6d 65 20 3d 20 73 | 74 72 69 6e 67 3b 0a 09 |name = s|tring;..|
|00003d60| 70 2d 3e 66 6d 74 2e 66 | 6d 74 2e 6d 61 78 5f 6d |p->fmt.f|mt.max_m|
|00003d70| 69 6e 2e 6d 61 78 20 3d | 20 6d 61 78 2d 3e 74 79 |in.max =| max->ty|
|00003d80| 70 65 20 3d 3d 20 49 4e | 54 45 47 45 52 20 3f 0a |pe == IN|TEGER ?.|
|00003d90| 09 09 28 64 6f 75 62 6c | 65 29 6d 61 78 2d 3e 76 |..(doubl|e)max->v|
|00003da0| 61 6c 75 65 2e 69 6e 74 | 65 67 65 72 20 3a 20 6d |alue.int|eger : m|
|00003db0| 61 78 2d 3e 76 61 6c 75 | 65 2e 72 65 61 6c 3b 0a |ax->valu|e.real;.|
|00003dc0| 09 70 2d 3e 66 6d 74 2e | 66 6d 74 2e 6d 61 78 5f |.p->fmt.|fmt.max_|
|00003dd0| 6d 69 6e 2e 6d 69 6e 20 | 3d 20 6d 69 6e 2d 3e 74 |min.min |= min->t|
|00003de0| 79 70 65 20 3d 3d 20 49 | 4e 54 45 47 45 52 20 3f |ype == I|NTEGER ?|
|00003df0| 0a 09 09 28 64 6f 75 62 | 6c 65 29 6d 69 6e 2d 3e |...(doub|le)min->|
|00003e00| 76 61 6c 75 65 2e 69 6e | 74 65 67 65 72 20 3a 20 |value.in|teger : |
|00003e10| 6d 69 6e 2d 3e 76 61 6c | 75 65 2e 72 65 61 6c 3b |min->val|ue.real;|
|00003e20| 0a 09 70 2d 3e 66 6d 74 | 2e 74 79 70 65 20 3d 20 |..p->fmt|.type = |
|00003e30| 4d 41 58 5f 4d 49 4e 3b | 0a 0a 09 72 65 74 75 72 |MAX_MIN;|...retur|
|00003e40| 6e 20 70 3b 0a 7d 0a 0a | 20 20 20 4b 65 6e 6e 65 |n p;.}..| Kenne|
|00003e50| 74 68 20 49 6e 67 68 61 | 6d 0a 0a 20 20 20 43 6f |th Ingha|m.. Co|
|00003e60| 70 79 72 69 67 68 74 20 | 28 43 29 20 31 39 38 38 |pyright |(C) 1988|
|00003e70| 20 54 68 65 20 55 6e 69 | 76 65 72 73 69 74 79 20 | The Uni|versity |
|00003e80| 6f 66 20 4e 65 77 20 4d | 65 78 69 63 6f 0a 2a 2f |of New M|exico.*/|
|00003e90| 0a 0a 23 69 6e 63 6c 75 | 64 65 20 22 64 65 66 73 |..#inclu|de "defs|
|00003ea0| 2e 68 22 0a 23 69 6e 63 | 6c 75 64 65 20 22 79 2e |.h".#inc|lude "y.|
|00003eb0| 74 61 62 2e 68 22 0a 0a | 73 74 72 75 63 74 20 63 |tab.h"..|struct c|
|00003ec0| 6d 64 5f 73 74 20 2a 0a | 62 75 69 6c 64 5f 63 6d |md_st *.|build_cm|
|00003ed0| 64 28 70 69 70 65 6c 69 | 6e 65 2c 20 61 6c 69 61 |d(pipeli|ne, alia|
|00003ee0| 73 2c 20 6f 75 74 5f 66 | 6d 74 2c 20 63 68 61 6e |s, out_f|mt, chan|
|00003ef0| 67 65 5f 66 6d 74 29 0a | 63 68 61 72 20 2a 61 6c |ge_fmt).|char *al|
|00003f00| 69 61 73 2c 20 2a 70 69 | 70 65 6c 69 6e 65 3b 0a |ias, *pi|peline;.|
|00003f10| 73 74 72 75 63 74 20 6f | 75 74 5f 66 6d 74 5f 73 |struct o|ut_fmt_s|
|00003f20| 74 20 2a 6f 75 74 5f 66 | 6d 74 3b 0a 73 74 72 75 |t *out_f|mt;.stru|
|00003f30| 63 74 20 63 68 61 6e 67 | 65 5f 66 6d 74 5f 73 74 |ct chang|e_fmt_st|
|00003f40| 20 2a 63 68 61 6e 67 65 | 5f 66 6d 74 3b 0a 7b 0a | *change|_fmt;.{.|
|00003f50| 09 65 78 74 65 72 6e 20 | 73 74 72 75 63 74 20 6f |.extern |struct o|
|00003f60| 75 74 5f 66 6d 74 5f 73 | 74 20 2a 6b 65 79 3b 0a |ut_fmt_s|t *key;.|
|00003f70| 09 73 74 72 75 63 74 20 | 63 6d 64 5f 73 74 20 2a |.struct |cmd_st *|
|00003f80| 70 3b 0a 0a 09 70 20 3d | 20 61 6c 6c 6f 63 61 74 |p;...p =| allocat|
|00003f90| 65 28 73 74 72 75 63 74 | 20 63 6d 64 5f 73 74 29 |e(struct| cmd_st)|
|00003fa0| 3b 0a 0a 09 70 2d 3e 70 | 69 70 65 6c 69 6e 65 20 |;...p->p|ipeline |
|00003fb0| 3d 20 70 69 70 65 6c 69 | 6e 65 3b 0a 09 70 2d 3e |= pipeli|ne;..p->|
|00003fc0| 61 6c 69 61 73 20 3d 20 | 61 6c 69 61 73 3b 0a 09 |alias = |alias;..|
|00003fd0| 70 2d 3e 63 68 61 6e 67 | 65 5f 66 6d 74 20 3d 20 |p->chang|e_fmt = |
|00003fe0| 63 68 61 6e 67 65 5f 66 | 6d 74 3b 0a 09 70 2d 3e |change_f|mt;..p->|
|00003ff0| 6e 65 78 74 20 3d 20 4e | 55 4c 4c 3b 0a 09 70 2d |next = N|ULL;..p-|
|00004000| 62 75 69 6c 64 5f 70 63 | 74 2e 63 00 00 00 00 00 |build_pc|t.c.....|
|00004010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004060| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00004070| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00004080| 30 30 30 31 30 35 35 00 | 30 34 34 35 37 34 35 30 |0001055.|04457450|
|00004090| 30 31 30 00 30 31 30 31 | 32 34 00 20 30 00 00 00 |010.0101|24. 0...|
|000040a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004100| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00004110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004150| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00004160| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00004170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004200| 2f 2a 0a 20 20 20 62 75 | 69 6c 64 5f 70 63 74 3a |/*. bu|ild_pct:|
|00004210| 20 62 75 69 6c 64 20 61 | 20 70 65 72 63 65 6e 74 | build a| percent|
|00004220| 20 63 68 61 6e 67 65 20 | 66 6f 72 6d 61 74 20 66 | change |format f|
|00004230| 6f 72 20 74 68 65 20 70 | 61 72 73 65 72 2e 0a 0a |or the p|arser...|
|00004240| 20 20 20 4b 65 6e 6e 65 | 74 68 20 49 6e 67 68 61 | Kenne|th Ingha|
|00004250| 6d 0a 0a 20 20 20 43 6f | 70 79 72 69 67 68 74 20 |m.. Co|pyright |
|00004260| 28 43 29 20 31 39 38 38 | 20 54 68 65 20 55 6e 69 |(C) 1988| The Uni|
|00004270| 76 65 72 73 69 74 79 20 | 6f 66 20 4e 65 77 20 4d |versity |of New M|
|00004280| 65 78 69 63 6f 0a 2a 2f | 0a 0a 23 69 6e 63 6c 75 |exico.*/|..#inclu|
|00004290| 64 65 20 22 64 65 66 73 | 2e 68 22 0a 23 69 6e 63 |de "defs|.h".#inc|
|000042a0| 6c 75 64 65 20 22 79 2e | 74 61 62 2e 68 22 0a 0a |lude "y.|tab.h"..|
|000042b0| 73 74 72 75 63 74 20 63 | 68 61 6e 67 65 5f 66 6d |struct c|hange_fm|
|000042c0| 74 5f 73 74 20 2a 0a 62 | 75 69 6c 64 5f 70 63 74 |t_st *.b|uild_pct|
|000042d0| 28 73 74 72 69 6e 67 2c | 20 6e 75 6d 62 65 72 29 |(string,| number)|
|000042e0| 0a 73 74 72 75 63 74 20 | 6e 75 6d 62 65 72 20 2a |.struct |number *|
|000042f0| 6e 75 6d 62 65 72 3b 0a | 63 68 61 72 20 2a 73 74 |number;.|char *st|
|00004300| 72 69 6e 67 3b 0a 7b 0a | 09 73 74 72 75 63 74 20 |ring;.{.|.struct |
|00004310| 63 68 61 6e 67 65 5f 66 | 6d 74 5f 73 74 20 2a 70 |change_f|mt_st *p|
|00004320| 3b 0a 0a 09 70 20 3d 20 | 61 6c 6c 6f 63 61 74 65 |;...p = |allocate|
|00004330| 28 73 74 72 75 63 74 20 | 63 68 61 6e 67 65 5f 66 |(struct |change_f|
|00004340| 6d 74 5f 73 74 29 3b 0a | 09 70 2d 3e 66 6d 74 2e |mt_st);.|.p->fmt.|
|00004350| 74 79 70 65 20 3d 20 50 | 45 52 43 45 4e 54 3b 0a |type = P|ERCENT;.|
|00004360| 09 70 2d 3e 6e 61 6d 65 | 20 3d 20 73 74 72 69 6e |.p->name| = strin|
|00004370| 67 3b 0a 09 69 66 20 28 | 6e 75 6d 62 65 72 2d 3e |g;..if (|number->|
|00004380| 74 79 70 65 20 3d 3d 20 | 49 4e 54 45 47 45 52 29 |type == |INTEGER)|
|00004390| 0a 09 09 70 2d 3e 66 6d | 74 2e 66 6d 74 2e 70 65 |...p->fm|t.fmt.pe|
|000043a0| 72 63 65 6e 74 20 3d 20 | 28 66 6c 6f 61 74 29 6e |rcent = |(float)n|
|000043b0| 75 6d 62 65 72 2d 3e 76 | 61 6c 75 65 2e 69 6e 74 |umber->v|alue.int|
|000043c0| 65 67 65 72 20 2f 20 31 | 30 30 2e 30 3b 0a 09 65 |eger / 1|00.0;..e|
|000043d0| 6c 73 65 0a 09 09 70 2d | 3e 66 6d 74 2e 66 6d 74 |lse...p-|>fmt.fmt|
|000043e0| 2e 70 65 72 63 65 6e 74 | 20 3d 20 6e 75 6d 62 65 |.percent| = numbe|
|000043f0| 72 2d 3e 76 61 6c 75 65 | 2e 72 65 61 6c 20 2f 20 |r->value|.real / |
|00004400| 31 30 30 2e 30 3b 0a 0a | 09 66 72 65 65 28 28 63 |100.0;..|.free((c|
|00004410| 68 61 72 20 2a 29 6e 75 | 6d 62 65 72 29 3b 0a 0a |har *)nu|mber);..|
|00004420| 09 72 65 74 75 72 6e 20 | 70 3b 0a 7d 0a 66 6f 72 |.return |p;.}.for|
|00004430| 20 74 68 65 20 70 61 72 | 73 65 72 2e 0a 0a 20 20 | the par|ser... |
|00004440| 4b 65 6e 6e 65 74 68 20 | 49 6e 67 68 61 6d 0a 0a |Kenneth |Ingham..|
|00004450| 20 20 43 6f 70 79 72 69 | 67 68 74 20 28 43 29 20 | Copyri|ght (C) |
|00004460| 31 39 38 38 20 54 68 65 | 20 55 6e 69 76 65 72 73 |1988 The| Univers|
|00004470| 69 74 79 20 6f 66 20 4e | 65 77 20 4d 65 78 69 63 |ity of N|ew Mexic|
|00004480| 6f 0a 2a 2f 0a 0a 23 69 | 6e 63 6c 75 64 65 20 22 |o.*/..#i|nclude "|
|00004490| 64 65 66 73 2e 68 22 0a | 23 69 6e 63 6c 75 64 65 |defs.h".|#include|
|000044a0| 20 22 79 2e 74 61 62 2e | 68 22 0a 0a 73 74 72 75 | "y.tab.|h"..stru|
|000044b0| 63 74 20 63 6f 6c 5f 6f | 75 74 5f 73 74 20 2a 0a |ct col_o|ut_st *.|
|000044c0| 62 75 69 6c 64 5f 63 6f | 6c 28 73 74 61 72 74 2c |build_co|l(start,|
|000044d0| 20 65 6e 64 2c 20 6e 61 | 6d 65 2c 20 74 79 70 65 | end, na|me, type|
|000044e0| 29 0a 63 68 61 72 20 2a | 6e 61 6d 65 2c 20 2a 74 |).char *|name, *t|
|000044f0| 79 70 65 3b 0a 69 6e 74 | 20 73 74 61 72 74 2c 20 |ype;.int| start, |
|00004500| 65 6e 64 3b 0a 7b 0a 09 | 65 78 74 65 72 6e 20 73 |end;.{..|extern s|
|00004510| 74 72 75 63 74 20 6f 75 | 74 5f 66 6d 74 5f 73 74 |truct ou|t_fmt_st|
|00004520| 20 2a 6b 65 79 3b 0a 09 | 65 78 74 65 72 6e 20 69 | *key;..|extern i|
|00004530| 6e 74 20 70 61 72 73 65 | 5f 65 72 72 6f 72 3b 0a |nt parse|_error;.|
|00004540| 09 65 78 74 65 72 6e 20 | 63 68 61 72 20 2a 6d 79 |.extern |char *my|
|00004550| 6e 61 6d 65 3b 0a 09 73 | 74 72 75 63 74 20 63 6f |name;..s|truct co|
|00004560| 6c 5f 6f 75 74 5f 73 74 | 20 2a 70 3b 0a 0a 09 70 |l_out_st| *p;...p|
|00004570| 20 3d 20 61 6c 6c 6f 63 | 61 74 65 28 73 74 72 75 | = alloc|ate(stru|
|00004580| 63 74 20 63 6f 6c 5f 6f | 75 74 5f 73 74 29 3b 0a |ct col_o|ut_st);.|
|00004590| 09 70 2d 3e 6e 61 6d 65 | 20 3d 20 6e 61 6d 65 3b |.p->name| = name;|
|000045a0| 0a 09 70 2d 3e 73 74 61 | 72 74 20 3d 20 73 74 61 |..p->sta|rt = sta|
|000045b0| 72 74 3b 0a 09 70 2d 3e | 65 6e 64 20 3d 20 65 6e |rt;..p->|end = en|
|000045c0| 64 3b 0a 09 70 2d 3e 6e | 65 78 74 20 3d 20 4e 55 |d;..p->n|ext = NU|
|000045d0| 4c 4c 3b 0a 0a 09 69 66 | 20 28 74 79 70 65 5b 31 |LL;...if| (type[1|
|000045e0| 5d 20 21 3d 20 27 5c 30 | 27 20 7c 7c 20 69 6e 64 |] != '\0|' || ind|
|000045f0| 65 78 28 22 64 66 73 6b | 22 2c 20 74 79 70 65 5b |ex("dfsk|", type[|
|00004600| 62 75 69 6c 64 5f 72 65 | 6c 2e 63 00 00 00 00 00 |build_re|l.c.....|
|00004610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004660| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00004670| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00004680| 30 30 30 32 31 35 30 00 | 30 34 34 35 37 34 35 30 |0002150.|04457450|
|00004690| 30 32 36 00 30 31 30 31 | 32 34 00 20 30 00 00 00 |026.0101|24. 0...|
|000046a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000046b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000046c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000046d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000046e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000046f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004700| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00004710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004750| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00004760| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00004770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000047a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000047b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000047c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000047d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000047e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000047f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004800| 2f 2a 0a 20 20 20 62 75 | 69 6c 64 5f 72 65 6c 3a |/*. bu|ild_rel:|
|00004810| 20 62 75 69 6c 64 20 61 | 20 72 65 6c 61 74 69 76 | build a| relativ|
|00004820| 65 20 6f 75 74 70 75 74 | 20 66 6f 72 6d 61 74 20 |e output| format |
|00004830| 73 74 72 75 63 74 75 72 | 65 20 66 6f 72 20 74 68 |structur|e for th|
|00004840| 65 20 70 61 72 73 65 72 | 0a 0a 20 20 20 4b 65 6e |e parser|.. Ken|
|00004850| 6e 65 74 68 20 49 6e 67 | 68 61 6d 0a 0a 20 20 20 |neth Ing|ham.. |
|00004860| 43 6f 70 79 72 69 67 68 | 74 20 28 43 29 20 31 39 |Copyrigh|t (C) 19|
|00004870| 38 38 20 54 68 65 20 55 | 6e 69 76 65 72 73 69 74 |88 The U|niversit|
|00004880| 79 20 6f 66 20 4e 65 77 | 20 4d 65 78 69 63 6f 0a |y of New| Mexico.|
|00004890| 2a 2f 0a 0a 23 69 6e 63 | 6c 75 64 65 20 22 64 65 |*/..#inc|lude "de|
|000048a0| 66 73 2e 68 22 0a 23 69 | 6e 63 6c 75 64 65 20 22 |fs.h".#i|nclude "|
|000048b0| 79 2e 74 61 62 2e 68 22 | 0a 0a 73 74 72 75 63 74 |y.tab.h"|..struct|
|000048c0| 20 72 65 6c 5f 6f 75 74 | 5f 73 74 20 2a 0a 62 75 | rel_out|_st *.bu|
|000048d0| 69 6c 64 5f 72 65 6c 28 | 66 69 65 6c 64 2c 20 6e |ild_rel(|field, n|
|000048e0| 61 6d 65 2c 20 74 79 70 | 65 29 0a 63 68 61 72 20 |ame, typ|e).char |
|000048f0| 2a 6e 61 6d 65 2c 20 2a | 74 79 70 65 3b 0a 69 6e |*name, *|type;.in|
|00004900| 74 20 66 69 65 6c 64 3b | 0a 7b 0a 09 65 78 74 65 |t field;|.{..exte|
|00004910| 72 6e 20 73 74 72 75 63 | 74 20 6f 75 74 5f 66 6d |rn struc|t out_fm|
|00004920| 74 5f 73 74 20 2a 6b 65 | 79 3b 0a 09 65 78 74 65 |t_st *ke|y;..exte|
|00004930| 72 6e 20 69 6e 74 20 70 | 61 72 73 65 5f 65 72 72 |rn int p|arse_err|
|00004940| 6f 72 3b 0a 09 65 78 74 | 65 72 6e 20 63 68 61 72 |or;..ext|ern char|
|00004950| 20 2a 6d 79 6e 61 6d 65 | 3b 0a 09 73 74 72 75 63 | *myname|;..struc|
|00004960| 74 20 72 65 6c 5f 6f 75 | 74 5f 73 74 20 2a 70 3b |t rel_ou|t_st *p;|
|00004970| 0a 0a 09 70 20 3d 20 61 | 6c 6c 6f 63 61 74 65 28 |...p = a|llocate(|
|00004980| 73 74 72 75 63 74 20 72 | 65 6c 5f 6f 75 74 5f 73 |struct r|el_out_s|
|00004990| 74 29 3b 0a 09 70 2d 3e | 6e 61 6d 65 20 3d 20 6e |t);..p->|name = n|
|000049a0| 61 6d 65 3b 0a 09 70 2d | 3e 66 69 65 6c 64 20 3d |ame;..p-|>field =|
|000049b0| 20 66 69 65 6c 64 3b 0a | 09 70 2d 3e 6e 65 78 74 | field;.|.p->next|
|000049c0| 20 3d 20 4e 55 4c 4c 3b | 0a 0a 09 69 66 20 28 74 | = NULL;|...if (t|
|000049d0| 79 70 65 5b 31 5d 20 21 | 3d 20 27 5c 30 27 20 7c |ype[1] !|= '\0' ||
|000049e0| 7c 20 69 6e 64 65 78 28 | 22 64 66 73 6b 22 2c 20 || index(|"dfsk", |
|000049f0| 74 79 70 65 5b 30 5d 29 | 20 3d 3d 20 4e 55 4c 4c |type[0])| == NULL|
|00004a00| 29 20 7b 0a 09 09 66 70 | 72 69 6e 74 66 28 73 74 |) {...fp|rintf(st|
|00004a10| 64 65 72 72 2c 22 25 73 | 3a 20 49 6e 76 61 6c 69 |derr,"%s|: Invali|
|00004a20| 64 20 74 79 70 65 20 73 | 70 65 63 69 66 69 65 72 |d type s|pecifier|
|00004a30| 20 22 2c 20 6d 79 6e 61 | 6d 65 29 3b 0a 09 09 66 | ", myna|me);...f|
|00004a40| 70 72 69 6e 74 66 28 73 | 74 64 65 72 72 2c 22 27 |printf(s|tderr,"'|
|00004a50| 25 73 27 20 66 6f 72 20 | 27 25 73 27 20 28 72 65 |%s' for |'%s' (re|
|00004a60| 6c 20 66 6d 74 29 2e 5c | 6e 22 2c 20 74 79 70 65 |l fmt).\|n", type|
|00004a70| 2c 20 70 2d 3e 6e 61 6d | 65 29 3b 0a 09 09 66 70 |, p->nam|e);...fp|
|00004a80| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 20 22 45 |rintf(st|derr, "E|
|00004a90| 78 70 65 63 74 69 6e 67 | 20 6f 6e 65 20 6f 66 20 |xpecting| one of |
|00004aa0| 27 64 66 73 6b 27 5c 6e | 22 29 3b 0a 09 09 70 61 |'dfsk'\n|");...pa|
|00004ab0| 72 73 65 5f 65 72 72 6f | 72 20 3d 20 54 72 75 65 |rse_erro|r = True|
|00004ac0| 3b 0a 09 09 72 65 74 75 | 72 6e 20 70 3b 0a 09 7d |;...retu|rn p;..}|
|00004ad0| 0a 0a 09 73 77 69 74 63 | 68 20 28 74 79 70 65 5b |...switc|h (type[|
|00004ae0| 30 5d 29 20 7b 0a 09 09 | 63 61 73 65 20 27 64 27 |0]) {...|case 'd'|
|00004af0| 3a 0a 09 09 09 70 2d 3e | 74 79 70 65 20 3d 20 49 |:....p->|type = I|
|00004b00| 4e 54 45 47 45 52 3b 0a | 09 09 09 62 72 65 61 6b |NTEGER;.|...break|
|00004b10| 3b 0a 09 09 63 61 73 65 | 20 27 66 27 3a 0a 09 09 |;...case| 'f':...|
|00004b20| 09 70 2d 3e 74 79 70 65 | 20 3d 20 46 4c 4f 41 54 |.p->type| = FLOAT|
|00004b30| 3b 0a 09 09 09 62 72 65 | 61 6b 3b 0a 09 09 63 61 |;....bre|ak;...ca|
|00004b40| 73 65 20 27 73 27 3a 0a | 09 09 09 70 2d 3e 74 79 |se 's':.|...p->ty|
|00004b50| 70 65 20 3d 20 53 54 52 | 49 4e 47 3b 0a 09 09 09 |pe = STR|ING;....|
|00004b60| 62 72 65 61 6b 3b 0a 09 | 09 63 61 73 65 20 27 6b |break;..|.case 'k|
|00004b70| 27 3a 0a 09 09 09 70 2d | 3e 74 79 70 65 20 3d 20 |':....p-|>type = |
|00004b80| 4b 45 59 3b 0a 09 09 09 | 6b 65 79 20 3d 20 61 6c |KEY;....|key = al|
|00004b90| 6c 6f 63 61 74 65 28 73 | 74 72 75 63 74 20 6f 75 |locate(s|truct ou|
|00004ba0| 74 5f 66 6d 74 5f 73 74 | 29 3b 0a 09 09 09 6b 65 |t_fmt_st|);....ke|
|00004bb0| 79 2d 3e 6f 75 74 5f 66 | 6d 74 2e 72 65 6c 5f 66 |y->out_f|mt.rel_f|
|00004bc0| 6d 74 20 3d 20 70 3b 0a | 09 09 09 6b 65 79 2d 3e |mt = p;.|...key->|
|00004bd0| 74 79 70 65 20 3d 20 43 | 4f 4c 55 4d 4e 3b 0a 09 |type = C|OLUMN;..|
|00004be0| 09 09 62 72 65 61 6b 3b | 0a 09 09 64 65 66 61 75 |..break;|...defau|
|00004bf0| 6c 74 3a 0a 09 09 09 2f | 2a 20 63 68 65 63 6b 65 |lt:..../|* checke|
|00004c00| 64 20 69 6e 20 69 66 20 | 61 62 6f 76 65 20 2a 2f |d in if |above */|
|00004c10| 0a 09 09 09 66 70 72 69 | 6e 74 66 28 73 74 64 65 |....fpri|ntf(stde|
|00004c20| 72 72 2c 22 69 6d 70 6f | 73 73 69 62 6c 65 20 63 |rr,"impo|ssible c|
|00004c30| 6f 6e 64 69 74 69 6f 6e | 20 69 6e 20 62 75 69 6c |ondition| in buil|
|00004c40| 64 5f 72 65 6c 5c 6e 22 | 29 3b 0a 09 09 09 65 78 |d_rel\n"|);....ex|
|00004c50| 69 74 28 31 29 3b 0a 09 | 7d 0a 0a 09 72 65 74 75 |it(1);..|}...retu|
|00004c60| 72 6e 20 70 3b 0a 7d 0a | 55 6e 69 76 76 65 72 73 |rn p;.}.|Univvers|
|00004c70| 69 74 79 20 6f 66 20 4e | 65 77 20 4d 65 78 69 63 |ity of N|ew Mexic|
|00004c80| 6f 0a 2a 2f 0a 0a 23 69 | 6e 63 6c 75 64 65 20 22 |o.*/..#i|nclude "|
|00004c90| 64 65 66 73 2e 68 22 0a | 23 69 6e 63 6c 75 64 65 |defs.h".|#include|
|00004ca0| 20 22 79 2e 74 61 62 2e | 68 22 0a 0a 73 74 72 75 | "y.tab.|h"..stru|
|00004cb0| 63 74 20 63 68 61 6e 67 | 65 5f 66 6d 74 5f 73 74 |ct chang|e_fmt_st|
|00004cc0| 20 2a 0a 62 75 69 6c 64 | 5f 6d 61 78 6d 69 6e 28 | *.build|_maxmin(|
|00004cd0| 73 74 72 69 6e 67 2c 20 | 6d 69 6e 2c 20 6d 61 78 |string, |min, max|
|00004ce0| 29 0a 73 74 72 75 63 74 | 20 6e 75 6d 62 65 72 20 |).struct| number |
|00004cf0| 2a 6d 61 78 2c 20 2a 6d | 69 6e 3b 0a 63 68 61 72 |*max, *m|in;.char|
|00004d00| 20 2a 73 74 72 69 6e 67 | 3b 0a 7b 0a 09 73 74 72 | *string|;.{..str|
|00004d10| 75 63 74 20 63 68 61 6e | 67 65 5f 66 6d 74 5f 73 |uct chan|ge_fmt_s|
|00004d20| 74 20 2a 70 3b 0a 0a 09 | 70 20 3d 20 61 6c 6c 6f |t *p;...|p = allo|
|00004d30| 63 61 74 65 28 73 74 72 | 75 63 74 20 63 68 61 6e |cate(str|uct chan|
|00004d40| 67 65 5f 66 6d 74 5f 73 | 74 29 3b 0a 09 70 2d 3e |ge_fmt_s|t);..p->|
|00004d50| 6e 61 6d 65 20 3d 20 73 | 74 72 69 6e 67 3b 0a 09 |name = s|tring;..|
|00004d60| 70 2d 3e 66 6d 74 2e 66 | 6d 74 2e 6d 61 78 5f 6d |p->fmt.f|mt.max_m|
|00004d70| 69 6e 2e 6d 61 78 20 3d | 20 6d 61 78 2d 3e 74 79 |in.max =| max->ty|
|00004d80| 70 65 20 3d 3d 20 49 4e | 54 45 47 45 52 20 3f 0a |pe == IN|TEGER ?.|
|00004d90| 09 09 28 64 6f 75 62 6c | 65 29 6d 61 78 2d 3e 76 |..(doubl|e)max->v|
|00004da0| 61 6c 75 65 2e 69 6e 74 | 65 67 65 72 20 3a 20 6d |alue.int|eger : m|
|00004db0| 61 78 2d 3e 76 61 6c 75 | 65 2e 72 65 61 6c 3b 0a |ax->valu|e.real;.|
|00004dc0| 09 70 2d 3e 66 6d 74 2e | 66 6d 74 2e 6d 61 78 5f |.p->fmt.|fmt.max_|
|00004dd0| 6d 69 6e 2e 6d 69 6e 20 | 3d 20 6d 69 6e 2d 3e 74 |min.min |= min->t|
|00004de0| 79 70 65 20 3d 3d 20 49 | 4e 54 45 47 45 52 20 3f |ype == I|NTEGER ?|
|00004df0| 0a 09 09 28 64 6f 75 62 | 6c 65 29 6d 69 6e 2d 3e |...(doub|le)min->|
|00004e00| 62 75 69 6c 64 5f 73 74 | 72 2e 63 00 00 00 00 00 |build_st|r.c.....|
|00004e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e60| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00004e70| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00004e80| 30 30 30 30 36 33 33 00 | 30 34 34 35 37 34 35 30 |0000633.|04457450|
|00004e90| 30 34 30 00 30 31 30 31 | 35 32 00 20 30 00 00 00 |040.0101|52. 0...|
|00004ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f00| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00004f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f50| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00004f60| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00004f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005000| 2f 2a 0a 20 20 20 62 75 | 69 6c 64 5f 73 74 72 3a |/*. bu|ild_str:|
|00005010| 20 62 75 69 6c 64 20 61 | 20 73 74 72 69 6e 67 20 | build a| string |
|00005020| 66 6f 72 6d 61 74 20 73 | 74 72 75 63 74 75 72 65 |format s|tructure|
|00005030| 20 66 6f 72 20 74 68 65 | 20 70 61 72 73 65 72 2e | for the| parser.|
|00005040| 0a 0a 20 20 20 4b 65 6e | 6e 65 74 68 20 49 6e 67 |.. Ken|neth Ing|
|00005050| 68 61 6d 0a 0a 20 20 20 | 43 6f 70 79 72 69 67 68 |ham.. |Copyrigh|
|00005060| 74 20 28 43 29 20 31 39 | 38 38 20 54 68 65 20 55 |t (C) 19|88 The U|
|00005070| 6e 69 76 65 72 73 69 74 | 79 20 6f 66 20 4e 65 77 |niversit|y of New|
|00005080| 20 4d 65 78 69 63 6f 0a | 2a 2f 0a 0a 23 69 6e 63 | Mexico.|*/..#inc|
|00005090| 6c 75 64 65 20 22 64 65 | 66 73 2e 68 22 0a 23 69 |lude "de|fs.h".#i|
|000050a0| 6e 63 6c 75 64 65 20 22 | 79 2e 74 61 62 2e 68 22 |nclude "|y.tab.h"|
|000050b0| 0a 0a 73 74 72 75 63 74 | 20 63 68 61 6e 67 65 5f |..struct| change_|
|000050c0| 66 6d 74 5f 73 74 20 2a | 0a 62 75 69 6c 64 5f 73 |fmt_st *|.build_s|
|000050d0| 74 72 28 73 74 72 69 6e | 67 2c 20 73 61 72 72 61 |tr(strin|g, sarra|
|000050e0| 79 29 0a 63 68 61 72 20 | 2a 2a 73 61 72 72 61 79 |y).char |**sarray|
|000050f0| 3b 0a 63 68 61 72 20 2a | 73 74 72 69 6e 67 3b 0a |;.char *|string;.|
|00005100| 7b 20 0a 09 73 74 72 75 | 63 74 20 63 68 61 6e 67 |{ ..stru|ct chang|
|00005110| 65 5f 66 6d 74 5f 73 74 | 20 2a 70 3b 0a 0a 09 70 |e_fmt_st| *p;...p|
|00005120| 20 3d 20 61 6c 6c 6f 63 | 61 74 65 28 73 74 72 75 | = alloc|ate(stru|
|00005130| 63 74 20 63 68 61 6e 67 | 65 5f 66 6d 74 5f 73 74 |ct chang|e_fmt_st|
|00005140| 29 3b 0a 09 70 2d 3e 6e | 61 6d 65 20 3d 20 73 74 |);..p->n|ame = st|
|00005150| 72 69 6e 67 3b 0a 09 70 | 2d 3e 66 6d 74 2e 74 79 |ring;..p|->fmt.ty|
|00005160| 70 65 20 3d 20 53 54 52 | 49 4e 47 3b 0a 09 70 2d |pe = STR|ING;..p-|
|00005170| 3e 66 6d 74 2e 66 6d 74 | 2e 73 74 72 5f 76 61 6c |>fmt.fmt|.str_val|
|00005180| 75 65 20 3d 20 73 61 72 | 72 61 79 3b 0a 0a 09 72 |ue = sar|ray;...r|
|00005190| 65 74 75 72 6e 20 70 3b | 0a 7d 0a 00 00 00 00 00 |eturn p;|.}......|
|000051a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005200| 63 68 65 63 6b 5f 69 74 | 65 6d 2e 63 00 00 00 00 |check_it|em.c....|
|00005210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005260| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00005270| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00005280| 30 30 30 32 37 30 30 00 | 30 34 34 36 33 34 31 34 |0002700.|04463414|
|00005290| 33 35 32 00 30 31 30 32 | 35 36 00 20 30 00 00 00 |352.0102|56. 0...|
|000052a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005300| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00005310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005350| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00005360| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00005370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005400| 2f 2a 0a 20 20 20 63 68 | 65 63 6b 5f 69 74 65 6d |/*. ch|eck_item|
|00005410| 3a 20 67 69 76 65 6e 20 | 61 20 76 61 6c 75 65 20 |: given |a value |
|00005420| 61 6e 64 20 61 20 63 68 | 61 6e 67 65 20 66 6f 72 |and a ch|ange for|
|00005430| 6d 61 74 20 73 74 72 75 | 63 74 75 72 65 2c 20 6d |mat stru|cture, m|
|00005440| 61 6b 65 20 73 75 72 65 | 0a 20 20 20 74 68 61 74 |ake sure|. that|
|00005450| 20 74 68 65 20 76 61 6c | 75 65 20 69 73 20 69 6e | the val|ue is in|
|00005460| 20 72 61 6e 67 65 2e 0a | 0a 20 20 20 42 61 73 69 | range..|. Basi|
|00005470| 63 61 6c 6c 79 2c 20 74 | 68 69 73 20 72 6f 75 74 |cally, t|his rout|
|00005480| 69 6e 65 20 69 73 20 61 | 20 6c 61 72 67 65 20 73 |ine is a| large s|
|00005490| 77 69 74 63 68 20 73 74 | 61 74 65 6d 65 6e 74 20 |witch st|atement |
|000054a0| 6f 6e 20 74 68 65 20 74 | 79 70 65 20 6f 66 0a 20 |on the t|ype of. |
|000054b0| 20 20 63 68 61 6e 67 65 | 20 74 68 61 74 20 67 72 | change| that gr|
|000054c0| 61 62 73 20 74 68 65 20 | 6e 65 63 65 73 73 61 72 |abs the |necessar|
|000054d0| 79 20 69 6e 66 6f 2c 20 | 61 6e 64 20 63 68 65 63 |y info, |and chec|
|000054e0| 6b 73 20 74 6f 20 73 65 | 65 20 69 66 20 74 68 65 |ks to se|e if the|
|000054f0| 20 69 74 65 6d 0a 20 20 | 20 69 73 20 77 6f 72 74 | item. | is wort|
|00005500| 68 20 6d 65 6e 74 69 6f | 6e 69 6e 67 2e 0a 0a 20 |h mentio|ning... |
|00005510| 20 20 4e 6f 74 65 20 74 | 68 61 74 20 77 68 61 74 | Note t|hat what|
|00005520| 20 77 65 20 70 72 69 6e | 74 20 6f 75 74 20 64 65 | we prin|t out de|
|00005530| 70 65 6e 64 73 20 6f 6e | 20 77 68 65 74 68 65 72 |pends on| whether|
|00005540| 20 6f 72 20 6e 6f 74 20 | 73 6f 6d 65 74 68 69 6e | or not |somethin|
|00005550| 67 20 65 6c 73 65 0a 20 | 20 20 68 61 73 20 62 65 |g else. | has be|
|00005560| 65 6e 20 66 6f 75 6e 64 | 20 77 72 6f 6e 67 20 6f |en found| wrong o|
|00005570| 6e 20 74 68 69 73 20 6c | 69 6e 65 2e 0a 0a 20 20 |n this l|ine... |
|00005580| 20 4b 65 6e 6e 65 74 68 | 20 49 6e 67 68 61 6d 0a | Kenneth| Ingham.|
|00005590| 0a 20 20 20 43 6f 70 79 | 72 69 67 68 74 20 28 43 |. Copy|right (C|
|000055a0| 29 20 31 39 38 37 20 54 | 68 65 20 55 6e 69 76 65 |) 1987 T|he Unive|
|000055b0| 72 73 69 74 79 20 6f 66 | 20 4e 65 77 20 4d 65 78 |rsity of| New Mex|
|000055c0| 69 63 6f 0a 2a 2f 0a 0a | 23 69 6e 63 6c 75 64 65 |ico.*/..|#include|
|000055d0| 20 22 64 65 66 73 2e 68 | 22 0a 23 69 6e 63 6c 75 | "defs.h|".#inclu|
|000055e0| 64 65 20 22 79 2e 74 61 | 62 2e 68 22 0a 0a 63 68 |de "y.ta|b.h"..ch|
|000055f0| 65 63 6b 5f 69 74 65 6d | 28 63 66 2c 20 76 61 6c |eck_item|(cf, val|
|00005600| 75 65 2c 20 63 6d 64 2c | 20 6c 69 6e 65 2c 20 70 |ue, cmd,| line, p|
|00005610| 72 65 76 5f 76 61 6c 29 | 0a 63 68 61 72 20 2a 76 |rev_val)|.char *v|
|00005620| 61 6c 75 65 2c 20 2a 63 | 6d 64 2c 20 2a 6c 69 6e |alue, *c|md, *lin|
|00005630| 65 3b 0a 73 74 72 75 63 | 74 20 63 68 61 6e 67 65 |e;.struc|t change|
|00005640| 5f 66 6d 74 5f 73 74 20 | 2a 63 66 3b 0a 73 74 72 |_fmt_st |*cf;.str|
|00005650| 75 63 74 20 65 76 65 72 | 79 74 68 69 6e 67 20 2a |uct ever|ything *|
|00005660| 70 72 65 76 5f 76 61 6c | 3b 0a 7b 0a 09 65 78 74 |prev_val|;.{..ext|
|00005670| 65 72 6e 20 69 6e 74 20 | 6c 69 6e 65 5f 6f 6b 2c |ern int |line_ok,|
|00005680| 20 63 6d 64 5f 6f 6b 3b | 0a 0a 09 73 77 69 74 63 | cmd_ok;|...switc|
|00005690| 68 28 63 66 2d 3e 66 6d | 74 2e 74 79 70 65 29 20 |h(cf->fm|t.type) |
|000056a0| 7b 0a 09 09 63 61 73 65 | 20 50 45 52 43 45 4e 54 |{...case| PERCENT|
|000056b0| 3a 0a 09 09 09 69 66 20 | 28 70 72 65 76 5f 76 61 |:....if |(prev_va|
|000056c0| 6c 20 3d 3d 20 4e 55 4c | 4c 29 20 2f 2a 20 6e 6f |l == NUL|L) /* no|
|000056d0| 74 68 69 6e 67 20 74 6f | 20 63 6f 6d 70 61 72 65 |thing to| compare|
|000056e0| 20 77 69 74 68 20 2a 2f | 0a 09 09 09 09 72 65 74 | with */|.....ret|
|000056f0| 75 72 6e 3b 0a 09 09 09 | 70 63 74 5f 63 68 65 63 |urn;....|pct_chec|
|00005700| 6b 28 76 61 6c 75 65 2c | 20 70 72 65 76 5f 76 61 |k(value,| prev_va|
|00005710| 6c 2c 20 63 66 2d 3e 66 | 6d 74 2e 66 6d 74 2e 70 |l, cf->f|mt.fmt.p|
|00005720| 65 72 63 65 6e 74 2c 0a | 09 09 09 09 63 6d 64 2c |ercent,.|....cmd,|
|00005730| 20 63 66 2d 3e 6e 61 6d | 65 2c 20 6c 69 6e 65 29 | cf->nam|e, line)|
|00005740| 3b 0a 09 09 09 62 72 65 | 61 6b 3b 0a 09 09 63 61 |;....bre|ak;...ca|
|00005750| 73 65 20 41 42 53 4f 4c | 55 54 45 3a 0a 09 09 09 |se ABSOL|UTE:....|
|00005760| 69 66 20 28 70 72 65 76 | 5f 76 61 6c 20 3d 3d 20 |if (prev|_val == |
|00005770| 4e 55 4c 4c 29 20 2f 2a | 20 6e 6f 74 68 69 6e 67 |NULL) /*| nothing|
|00005780| 20 74 6f 20 63 6f 6d 70 | 61 72 65 20 77 69 74 68 | to comp|are with|
|00005790| 20 2a 2f 0a 09 09 09 09 | 72 65 74 75 72 6e 3b 0a | */.....|return;.|
|000057a0| 09 09 09 61 62 73 5f 63 | 68 65 63 6b 28 76 61 6c |...abs_c|heck(val|
|000057b0| 75 65 2c 20 70 72 65 76 | 5f 76 61 6c 2c 20 63 66 |ue, prev|_val, cf|
|000057c0| 2d 3e 66 6d 74 2e 66 6d | 74 2e 61 62 73 5f 61 6d |->fmt.fm|t.abs_am|
|000057d0| 6f 75 6e 74 2c 0a 09 09 | 09 09 63 6d 64 2c 20 63 |ount,...|..cmd, c|
|000057e0| 66 2d 3e 6e 61 6d 65 2c | 20 6c 69 6e 65 29 3b 0a |f->name,| line);.|
|000057f0| 09 09 09 62 72 65 61 6b | 3b 0a 09 09 63 61 73 65 |...break|;...case|
|00005800| 20 4d 41 58 5f 4d 49 4e | 3a 0a 09 09 09 6d 61 78 | MAX_MIN|:....max|
|00005810| 6d 69 6e 5f 63 68 65 63 | 6b 28 76 61 6c 75 65 2c |min_chec|k(value,|
|00005820| 20 63 66 2d 3e 66 6d 74 | 2e 66 6d 74 2e 6d 61 78 | cf->fmt|.fmt.max|
|00005830| 5f 6d 69 6e 2e 6d 61 78 | 2c 0a 09 09 09 09 63 66 |_min.max|,.....cf|
|00005840| 2d 3e 66 6d 74 2e 66 6d | 74 2e 6d 61 78 5f 6d 69 |->fmt.fm|t.max_mi|
|00005850| 6e 2e 6d 69 6e 2c 20 63 | 6d 64 2c 20 63 66 2d 3e |n.min, c|md, cf->|
|00005860| 6e 61 6d 65 2c 20 6c 69 | 6e 65 29 3b 0a 09 09 09 |name, li|ne);....|
|00005870| 62 72 65 61 6b 3b 0a 09 | 09 63 61 73 65 20 53 54 |break;..|.case ST|
|00005880| 52 49 4e 47 3a 0a 09 09 | 09 73 74 72 5f 63 68 65 |RING:...|.str_che|
|00005890| 63 6b 28 76 61 6c 75 65 | 2c 20 63 66 2d 3e 66 6d |ck(value|, cf->fm|
|000058a0| 74 2e 66 6d 74 2e 73 74 | 72 5f 76 61 6c 75 65 2c |t.fmt.st|r_value,|
|000058b0| 20 63 6d 64 2c 0a 09 09 | 09 09 63 66 2d 3e 6e 61 | cmd,...|..cf->na|
|000058c0| 6d 65 2c 20 6c 69 6e 65 | 29 3b 0a 09 09 09 62 72 |me, line|);....br|
|000058d0| 65 61 6b 3b 0a 09 09 63 | 61 73 65 20 41 4e 59 3a |eak;...c|ase ANY:|
|000058e0| 0a 09 09 09 69 66 20 28 | 70 72 65 76 5f 76 61 6c |....if (|prev_val|
|000058f0| 20 3d 3d 20 4e 55 4c 4c | 29 20 2f 2a 20 6e 6f 74 | == NULL|) /* not|
|00005900| 68 69 6e 67 20 74 6f 20 | 63 6f 6d 70 61 72 65 20 |hing to |compare |
|00005910| 77 69 74 68 20 2a 2f 0a | 09 09 09 09 72 65 74 75 |with */.|....retu|
|00005920| 72 6e 3b 0a 09 09 09 61 | 6e 79 5f 63 68 65 63 6b |rn;....a|ny_check|
|00005930| 28 76 61 6c 75 65 2c 20 | 70 72 65 76 5f 76 61 6c |(value, |prev_val|
|00005940| 2c 20 63 6d 64 2c 20 63 | 66 2d 3e 6e 61 6d 65 2c |, cmd, c|f->name,|
|00005950| 20 6c 69 6e 65 29 3b 0a | 09 09 09 62 72 65 61 6b | line);.|...break|
|00005960| 3b 0a 09 09 64 65 66 61 | 75 6c 74 3a 0a 09 09 09 |;...defa|ult:....|
|00005970| 70 72 69 6e 74 66 28 22 | 63 68 65 63 6b 5f 69 74 |printf("|check_it|
|00005980| 65 6d 3a 20 69 6d 70 6f | 73 73 69 62 6c 65 20 63 |em: impo|ssible c|
|00005990| 6f 6e 64 69 74 69 6f 6e | 5c 6e 22 29 3b 0a 09 09 |ondition|\n");...|
|000059a0| 09 62 72 65 61 6b 3b 0a | 09 7d 0a 09 63 6d 64 5f |.break;.|.}..cmd_|
|000059b0| 6f 6b 20 3d 20 6c 69 6e | 65 5f 6f 6b 3b 0a 7d 0a |ok = lin|e_ok;.}.|
|000059c0| 20 3d 20 4e 55 4c 4c 3b | 0a 0a 09 69 66 20 28 74 | = NULL;|...if (t|
|000059d0| 79 70 65 5b 31 5d 20 21 | 3d 20 27 5c 30 27 20 7c |ype[1] !|= '\0' ||
|000059e0| 7c 20 69 6e 64 65 78 28 | 22 64 66 73 6b 22 2c 20 || index(|"dfsk", |
|000059f0| 74 79 70 65 5b 30 5d 29 | 20 3d 3d 20 4e 55 4c 4c |type[0])| == NULL|
|00005a00| 63 68 65 63 6b 6c 69 6e | 65 2e 63 00 00 00 00 00 |checklin|e.c.....|
|00005a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a60| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00005a70| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00005a80| 30 30 30 32 36 33 36 00 | 30 34 34 36 35 37 33 30 |0002636.|04465730|
|00005a90| 35 31 36 00 30 31 30 31 | 32 35 00 20 30 00 00 00 |516.0101|25. 0...|
|00005aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b00| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00005b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b50| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00005b60| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00005b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c00| 2f 2a 0a 20 20 20 63 68 | 65 63 6b 6c 69 6e 65 3a |/*. ch|eckline:|
|00005c10| 20 63 68 65 63 6b 20 74 | 68 65 20 69 6e 70 75 74 | check t|he input|
|00005c20| 20 6c 69 6e 65 20 6a 75 | 73 74 20 72 65 61 64 20 | line ju|st read |
|00005c30| 69 6e 20 61 67 61 69 6e | 73 74 20 77 68 61 74 20 |in again|st what |
|00005c40| 77 65 20 65 78 70 65 63 | 74 0a 20 20 20 74 6f 20 |we expec|t. to |
|00005c50| 66 69 6e 64 20 61 6e 64 | 20 72 65 70 6f 72 74 20 |find and| report |
|00005c60| 61 6e 79 20 70 72 6f 62 | 6c 65 6d 73 2e 20 20 41 |any prob|lems. A|
|00005c70| 63 74 75 61 6c 6c 79 2c | 20 6d 6f 73 74 20 6f 66 |ctually,| most of|
|00005c80| 20 74 68 65 20 77 6f 72 | 6b 20 69 73 20 64 6f 6e | the wor|k is don|
|00005c90| 65 0a 20 20 20 62 79 20 | 63 68 65 63 6b 5f 69 74 |e. by |check_it|
|00005ca0| 65 6d 2e 20 20 57 65 20 | 6a 75 73 74 20 69 64 65 |em. We |just ide|
|00005cb0| 6e 74 69 66 79 20 77 68 | 61 74 20 6e 65 65 64 73 |ntify wh|at needs|
|00005cc0| 20 74 6f 20 62 65 20 63 | 68 65 63 6b 65 64 2e 0a | to be c|hecked..|
|00005cd0| 0a 20 20 20 4b 65 6e 6e | 65 74 68 20 49 6e 67 68 |. Kenn|eth Ingh|
|00005ce0| 61 6d 0a 0a 20 20 20 43 | 6f 70 79 72 69 67 68 74 |am.. C|opyright|
|00005cf0| 20 28 43 29 20 31 39 38 | 37 20 54 68 65 20 55 6e | (C) 198|7 The Un|
|00005d00| 69 76 65 72 73 69 74 79 | 20 6f 66 20 4e 65 77 20 |iversity| of New |
|00005d10| 4d 65 78 69 63 6f 0a 2a | 2f 0a 0a 23 69 6e 63 6c |Mexico.*|/..#incl|
|00005d20| 75 64 65 20 22 64 65 66 | 73 2e 68 22 0a 23 69 6e |ude "def|s.h".#in|
|00005d30| 63 6c 75 64 65 20 22 79 | 2e 74 61 62 2e 68 22 0a |clude "y|.tab.h".|
|00005d40| 0a 63 68 65 63 6b 6c 69 | 6e 65 28 63 6d 64 2c 20 |.checkli|ne(cmd, |
|00005d50| 6c 69 6e 65 2c 20 70 72 | 65 76 5f 72 65 73 2c 20 |line, pr|ev_res, |
|00005d60| 68 66 29 0a 73 74 72 75 | 63 74 20 63 6d 64 5f 73 |hf).stru|ct cmd_s|
|00005d70| 74 20 2a 63 6d 64 3b 0a | 63 68 61 72 20 2a 6c 69 |t *cmd;.|char *li|
|00005d80| 6e 65 3b 0a 73 74 72 75 | 63 74 20 6f 6c 64 5f 63 |ne;.stru|ct old_c|
|00005d90| 6d 64 5f 73 74 20 2a 70 | 72 65 76 5f 72 65 73 3b |md_st *p|rev_res;|
|00005da0| 0a 46 49 4c 45 20 2a 68 | 66 3b 0a 7b 0a 09 65 78 |.FILE *h|f;.{..ex|
|00005db0| 74 65 72 6e 20 69 6e 74 | 20 6c 69 6e 65 5f 6f 6b |tern int| line_ok|
|00005dc0| 3b 0a 09 73 74 72 75 63 | 74 20 63 68 61 6e 67 65 |;..struc|t change|
|00005dd0| 5f 66 6d 74 5f 73 74 20 | 2a 63 66 3b 0a 09 73 74 |_fmt_st |*cf;..st|
|00005de0| 72 75 63 74 20 6f 75 74 | 5f 66 6d 74 5f 73 74 20 |ruct out|_fmt_st |
|00005df0| 6f 66 3b 0a 09 63 68 61 | 72 20 6b 65 79 5f 76 61 |of;..cha|r key_va|
|00005e00| 6c 5b 4d 41 58 5f 53 54 | 52 5d 3b 0a 09 63 68 61 |l[MAX_ST|R];..cha|
|00005e10| 72 20 2a 63 6d 64 5f 6e | 61 6d 65 3b 0a 0a 09 63 |r *cmd_n|ame;...c|
|00005e20| 6d 64 5f 6e 61 6d 65 20 | 3d 20 28 28 63 6d 64 2d |md_name |= ((cmd-|
|00005e30| 3e 61 6c 69 61 73 20 21 | 3d 20 4e 55 4c 4c 29 20 |>alias !|= NULL) |
|00005e40| 3f 20 63 6d 64 2d 3e 61 | 6c 69 61 73 20 3a 20 63 |? cmd->a|lias : c|
|00005e50| 6d 64 2d 3e 70 69 70 65 | 6c 69 6e 65 29 3b 0a 09 |md->pipe|line);..|
|00005e60| 09 0a 09 73 61 76 65 5f | 6b 65 79 28 63 6d 64 2c |...save_|key(cmd,|
|00005e70| 20 6c 69 6e 65 2c 20 6b | 65 79 5f 76 61 6c 2c 20 | line, k|ey_val, |
|00005e80| 68 66 29 3b 20 2f 2a 20 | 73 69 64 65 20 65 66 66 |hf); /* |side eff|
|00005e90| 65 63 74 3a 20 72 65 74 | 75 72 6e 20 6b 65 79 20 |ect: ret|urn key |
|00005ea0| 76 61 6c 75 65 20 2a 2f | 0a 0a 09 2f 2a 20 66 6f |value */|.../* fo|
|00005eb0| 72 20 65 61 63 68 20 63 | 68 61 6e 67 65 20 66 6f |r each c|hange fo|
|00005ec0| 72 6d 61 74 20 69 74 65 | 6d 20 2a 2f 0a 09 6c 69 |rmat ite|m */..li|
|00005ed0| 6e 65 5f 6f 6b 20 3d 20 | 54 72 75 65 3b 0a 09 66 |ne_ok = |True;..f|
|00005ee0| 6f 72 20 28 63 66 3d 63 | 6d 64 2d 3e 63 68 61 6e |or (cf=c|md->chan|
|00005ef0| 67 65 5f 66 6d 74 3b 20 | 63 66 3b 20 63 66 3d 63 |ge_fmt; |cf; cf=c|
|00005f00| 66 2d 3e 6e 65 78 74 29 | 20 7b 0a 09 09 2f 2a 20 |f->next)| {.../* |
|00005f10| 66 69 6e 64 20 74 68 65 | 20 6f 75 74 70 75 74 20 |find the| output |
|00005f20| 66 6f 72 6d 61 74 20 65 | 6e 74 72 79 20 66 6f 72 |format e|ntry for|
|00005f30| 20 74 68 69 73 20 69 74 | 65 6d 20 2a 2f 0a 09 09 | this it|em */...|
|00005f40| 69 66 20 28 21 66 69 6e | 64 5f 6f 66 28 63 66 2d |if (!fin|d_of(cf-|
|00005f50| 3e 6e 61 6d 65 2c 20 63 | 6d 64 2d 3e 6f 75 74 5f |>name, c|md->out_|
|00005f60| 66 6d 74 2c 20 26 6f 66 | 29 29 20 7b 0a 09 09 09 |fmt, &of|)) {....|
|00005f70| 66 70 72 69 6e 74 66 28 | 73 74 64 65 72 72 2c 20 |fprintf(|stderr, |
|00005f80| 22 57 61 72 6e 69 6e 67 | 3a 20 25 73 20 61 70 70 |"Warning|: %s app|
|00005f90| 65 61 72 73 20 69 6e 20 | 63 68 61 6e 67 65 20 6c |ears in |change l|
|00005fa0| 69 73 74 20 22 2c 0a 09 | 09 09 09 63 66 2d 3e 6e |ist ",..|...cf->n|
|00005fb0| 61 6d 65 29 3b 0a 09 09 | 09 66 70 72 69 6e 74 66 |ame);...|.fprintf|
|00005fc0| 28 73 74 64 65 72 72 2c | 20 22 62 75 74 20 6e 6f |(stderr,| "but no|
|00005fd0| 74 20 69 6e 20 6f 75 74 | 70 75 74 20 66 6f 72 6d |t in out|put form|
|00005fe0| 61 74 20 66 6f 72 20 25 | 73 5c 6e 22 2c 0a 09 09 |at for %|s\n",...|
|00005ff0| 09 09 63 6d 64 5f 6e 61 | 6d 65 29 3b 0a 09 09 09 |..cmd_na|me);....|
|00006000| 63 6f 6e 74 69 6e 75 65 | 3b 0a 09 09 7d 0a 0a 09 |continue|;...}...|
|00006010| 09 2f 2a 0a 09 09 20 20 | 20 63 68 65 63 6b 20 74 |./*... | check t|
|00006020| 68 65 20 69 74 65 6d 2c | 20 64 65 70 65 6e 64 69 |he item,| dependi|
|00006030| 6e 67 20 6f 6e 20 77 68 | 69 63 68 20 74 79 70 65 |ng on wh|ich type|
|00006040| 20 6f 66 20 6f 75 74 70 | 75 74 0a 09 09 20 20 20 | of outp|ut... |
|00006050| 66 6f 72 6d 61 74 20 77 | 65 20 68 61 76 65 2e 0a |format w|e have..|
|00006060| 09 09 2a 2f 0a 09 09 73 | 77 69 74 63 68 20 28 63 |..*/...s|witch (c|
|00006070| 6d 64 2d 3e 6f 75 74 5f | 66 6d 74 2d 3e 74 79 70 |md->out_|fmt->typ|
|00006080| 65 29 20 7b 0a 09 09 09 | 63 61 73 65 20 52 45 4c |e) {....|case REL|
|00006090| 41 54 49 56 45 3a 0a 09 | 09 09 09 63 68 65 63 6b |ATIVE:..|...check|
|000060a0| 5f 72 65 6c 5f 69 74 65 | 6d 28 70 72 65 76 5f 72 |_rel_ite|m(prev_r|
|000060b0| 65 73 2c 20 6f 66 2e 6f | 75 74 5f 66 6d 74 2e 72 |es, of.o|ut_fmt.r|
|000060c0| 65 6c 5f 66 6d 74 2c 0a | 09 09 09 09 09 6b 65 79 |el_fmt,.|.....key|
|000060d0| 5f 76 61 6c 2c 20 6c 69 | 6e 65 2c 20 63 66 2c 20 |_val, li|ne, cf, |
|000060e0| 63 6d 64 5f 6e 61 6d 65 | 2c 20 68 66 29 3b 0a 09 |cmd_name|, hf);..|
|000060f0| 09 09 09 62 72 65 61 6b | 3b 0a 09 09 09 63 61 73 |...break|;....cas|
|00006100| 65 20 43 4f 4c 55 4d 4e | 3a 0a 09 09 09 09 63 68 |e COLUMN|:.....ch|
|00006110| 65 63 6b 5f 63 6f 6c 5f | 69 74 65 6d 28 70 72 65 |eck_col_|item(pre|
|00006120| 76 5f 72 65 73 2c 20 6f | 66 2e 6f 75 74 5f 66 6d |v_res, o|f.out_fm|
|00006130| 74 2e 63 6f 6c 5f 66 6d | 74 2c 0a 09 09 09 09 09 |t.col_fm|t,......|
|00006140| 6b 65 79 5f 76 61 6c 2c | 20 6c 69 6e 65 2c 20 63 |key_val,| line, c|
|00006150| 66 2c 20 63 6d 64 5f 6e | 61 6d 65 2c 20 68 66 29 |f, cmd_n|ame, hf)|
|00006160| 3b 0a 09 09 09 09 62 72 | 65 61 6b 3b 0a 09 09 7d |;.....br|eak;...}|
|00006170| 0a 09 7d 0a 09 69 66 20 | 28 21 6c 69 6e 65 5f 6f |..}..if |(!line_o|
|00006180| 6b 29 0a 09 09 70 72 69 | 6e 74 66 28 22 2d 2d 2d |k)...pri|ntf("---|
|00006190| 2d 2d 2d 2d 2d 2d 5c 6e | 22 29 3b 0a 7d 0a 00 00 |------\n|");.}...|
|000061a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006200| 63 68 6b 5f 63 6f 6c 5f | 69 74 65 6d 2e 63 00 00 |chk_col_|item.c..|
|00006210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006260| 00 00 00 00 31 30 30 36 | 34 30 00 00 30 31 31 36 |....1006|40..0116|
|00006270| 31 33 00 00 30 30 30 30 | 31 32 00 00 30 30 30 30 |13..0000|12..0000|
|00006280| 30 30 30 31 36 31 36 00 | 30 34 34 35 37 34 34 36 |0001616.|04457446|
|00006290| 35 34 36 00 30 31 30 36 | 32 35 00 20 30 00 00 00 |546.0106|25. 0...|
|000062a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006300| 00 33 37 37 37 37 37 37 | 37 37 37 37 00 00 00 00 |.3777777|7777....|
|00006310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006350| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00006360| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00006370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.